Just like cd, you can easily get back to the previous checked out git branch by doing:

git co -

Example

Robins-MacBook-Pro-2:TIL robin$ git co master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Robins-MacBook-Pro-2:TIL robin$ git co -
Switched to branch 'gh-pages'
Robins-MacBook-Pro-2:TIL robin\$