Return to previous branch
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`
Git, Branch · Apr 13, 2021
Switches back to the last branch.
git checkout -
to switch back to the previous branch.git checkout -
git checkout patch-1
git checkout master
git checkout - # Switches to `patch-1`
Did you make a mistake but haven't pushed your changes yet? Learn how to rewind back to a specific commit in Git.
Git, Branch · May 26, 2023
Forces an update of the remote branch after rewriting the history locally.
Git, Branch · Apr 13, 2021