Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 339 Bytes

git-checkout-previous-branch.md

File metadata and controls

5 lines (4 loc) · 339 Bytes

Checkout previous branch in Git

  • git checkout - is a shorthand for git checkout @{-1}. It will checkout the last previous branch.
  • @{-1} refers to the last branch that was checked. It can be used with git checkout @{-1} to checkout the previous branch.
  • You can also checkout the N-th last branch using git checkout @{-N}.