Return to previous branch

Isabelle Viktoria Maciohsek · Git, Branch · Apr 13, 2021

Switches back to the last branch.

  • Use git checkout - to switch back to the previous branch.
git checkout -
git checkout patch-1
git checkout master
git checkout - # Switches to `patch-1`

Recommended snippets