Git - checkout previous branch easily
You probably know you can go back to the previous directory by typing the following command in your terminal: cd -
.
Example:
> cd projects
> pwd
/home/antonk/projects
> cd -
~
> pwd
/home/antonk
But, do you know git also can do actually the same when you are working with multiple branches ?
(develop) > git checkout staging
Switched to branch 'staging'
(staging) > git checkout -
Switched to branch 'develop'
Written by Anton Kalyaev
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#