klr_pq
Last Updated: February 25, 2016
·
1.485K
· twolfson

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.

3 Responses
Add your response

2621

Thanks! I had no idea that would work. This will make merging and moving around branches much easier.

over 1 year ago ·
3328

I must admit I didn't even know about cd - going to the last used directory; I'll definitely be using both.

over 1 year ago ·
15279

Didn't know merge could be used with - as well. Super pro tip thanks Bro!

over 1 year ago ·