1. Stashing Commands
git stashWhat it doesCauses unprocessed changes in memory and returns a clean Working Tree
When to use itWhen you need to move to another branch sooner before completing the commit
Example
git stashgit stash save "work in progress"What it doesSave changes with an explanatory message for easy remembering later
When to use itWhen there are multiple stashes and you want to distinguish each one
Example
git stash save "refactor auth logic"git stash listWhat it doesDisplays a list of all cached edits and their handles
When to use itTo review what you stored previously
Example
git stash listgit stash popWhat it doesRetrieves the last saved stash and applies it to the branch and deletes it from the list
When to use itWhen you return to your branch and wish to resume your previous work
Example
git stash popgit stash applyWhat it doesApplies the last stash to files while keeping a copy of it in the list without deleting it
When to use itTo apply the same modifications to more than one branch of the experiment
Example
git stash applygit stash drop stash@{0}What it doesManually deletes a selected stash from the list without applying it
When to use itto get rid of demo work you no longer need
Example
git stash drop stash@{0}
2. Tags and Releases
git tag v1.0.0What it doesCreates a Lightweight Tag at the current HEAD location
When to use itto reference an internally defined version flag
Example
git tag v1.0.0git tag -a v1.0.0 -m "Release version 1.0.0"What it doesCreates an Annotated Tag that includes a message, name and date of the owner of the tag
When to use itFor official production releases
Example
git tag -a v1.0.0 -m "Release v1.0.0"git tag -s v1.2.0 -m "Signed release"What it doesCreates a cryptographically signed tag using a GPG key to ensure identity
When to use itin high security open source and production projects
Example
git tag -s v1.2.0 -m "Signed release"git tag --listWhat it doesdisplays all tags saved in the repository
When to use itto search for previous versions
Example
git tag --list "v1.*"git push origin v1.0.0What it doesUploads a specific tag to the remote repository
When to use itto publish a new version tag to GitHub
Example
git push origin v1.0.0