Last Updated: February 25, 2016
·
806
· salrepe

Come back to the previous branch in git

If you change from one branch to another and you want to come back to the first one, there is a simple command in git to do it:

git checkout -

2 Responses
Add your response

Confirmed working as old as git version 1.7.9.5.

This rocks!

over 1 year ago ·

if you have oh my zsh:

gco -

:P

over 1 year ago ·