Stash
git stashStash tracked changes
bash
git stashgit stash popApply + drop the newest stash
bash
git stash popgit stash listList all stashes
bash
git stash listgit stash applyApply a specific stash without dropping it
bash
git stash apply stash@{2}Branching
New branch + switchCreate and switch in one step (Git 2.23+)
bash
git switch -c feature/loginDelete a branch-D forces delete of unmerged branches
bash
git branch -d feature/loginRename current branch
bash
git branch -m new-nameHistory
Pretty log
bash
git log --oneline --graph --decorate --allUndo last commit, keep changes
bash
git reset --soft HEAD~1Amend commit messageNever amend pushed commits
bash
git commit --amend -m 'better message'