Quick Switching Between Branches in Git

Quite often I find I need to switch between two git branches, whether it’s between a feature branch and master, or between two feature branches that I’m working on at the same time.

Rather than having to remember the two branch names, you can use this simple command:

git checkout -

You can also use cd - to swap between directories in your terminal.

64 Words

2019-04-17 01:33 +0000