Code Worrier

Teaching myself to RTFM

How to Checkout the Last Git Branch You Were On

| Comments

Checking out the last branch you were on is as simple as git checkout -.

1
2
3
4
5
6
11:13:14-hoffm~/src/food52 (develop)$ git checkout master
Switched to branch 'master'
11:13:21-hoffm~/src/food52 (master)$ git checkout -
Switched to branch 'develop'
11:13:23-hoffm~/src/food52 (develop)$ git checkout -
Switched to branch 'master'

Boom!

Comments