Go to the previous git branch
So let's say you have branch master and production in your git repository, and you want to switch easily back and forth.
Just do:
git checkout -
That will take you to the last branch you was at. Of course this applies to commits also.
FYI, this works the same as cd -
for changing to the last directory.
Written by Edgar Suarez
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#