git go to previous branch

Shell
git checkout -
Source

Also in Shell: