how to get back to previous branch in git and make it last code example Example: git go to previous branch git checkout -