Git: use - to refer to the branch you were previously on
Use -
to refer to your previously selected Git branch
You may already know you can use -
with cd
to go back to your previous current path cd -
.
Well, same goes for a couple of handy git commands, e.g.:
1. checkout: git checkout -
(very useful when you're dancing between two branches)
2. merge: git merge - [--no-ff]
(very useful, but be careful)
Written by Minkihn
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#