← Cheat Sheets
Git Stash, Tags and History
Shelve work, mark releases and inspect history.
# Git Stash, Tags and History
Shelve work, mark releases and inspect history.
```bash
git stash push -m "wip" # shelve changes
git stash list
git stash pop # apply and remove latest
git stash apply stash@{1} # apply without removing
git stash drop stash@{0}
git tag v1.0.0 # lightweight tag
git tag -a v1.0.0 -m "Release" # annotated tag
git push origin v1.0.0 # share a tag
git log --oneline --graph --decorate --all
git log -p file # history with diffs
git log --author="name" --since="2 weeks ago"
git show <sha> # one commit
git blame file # who changed each line
git diff # unstaged changes
git diff --staged # staged changes
git bisect start / good / bad # binary search for a bug
```