Git has a cool shortcut -
— previous branch. It's great to use when navigating between branches:
# go back to the previous branch
git checkout -
And during merge:
# merge the previous branch to the master
git checkout master && git merge -
PROTIP: Checkout is the most popular command in Git. I suggest you aliasing it with git co
to type it faster:
git config --global alias.co checkout
Top comments (0)