Checkout/Merge previous branch
Similarly to cd -, git checkout -
and git merge -
will checkout/merge the previous branch respectively.
For example, if you are in dev/new.modal
and you run git checkout master
. Then, git merge -
will merge dev/new.modal
to master
.
Related protips:
Written by Todd Wolfson
Related protips
2 Responses
Thanks! I had no idea that would work. This will make merging and moving around branches much easier.
over 1 year ago
·
Didn't know merge could be used with - as well. Super pro tip thanks Bro!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Branch
Authors
niklongstone
41.97K
muzzlefork
11.98K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#