Switched branches and want to jump back?
Like
git switch -
cd -, it returns to the branch you checked out last. Run it again to toggle between the two.commit c5676d1
and it works with merge too 🔥 git merge - pulls in the branch you were just on
Wait until you pair that with
git merge - or git rebase -. The shorthand @{-1} works across almost every git command that takes a branch ref.