klr_pq
Last Updated: February 25, 2016
·
1.367K
· twolfson
15927fc52919e9223adc7ed99e125d4d

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.

Say Thanks
Respond

3 Responses
Add your response

2621
Avatar

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

over 1 year ago ·
3328
Mich400x400

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
70e1167dbde5397557b0ec6fabb3d90a

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

over 1 year ago ·
Filed Under