Last Updated: September 09, 2019
·
438
· midu

Git: checkout previous branch

Just like you can cd - to get to the previous directory, you can git checkout - to get to the previous branch you were in.

$ git checkout feature 
Switched to branch 'feature'
$ git checkout -  
Switched to branch 'master'
$