I have recently moved from SVN to Git and am a bit confused about something. I needed to run the previous version of a script through a debugger, so I did git checkout <
git checkout <
With Git 2.23+ (August 2019), the best practice would be to use git switch instead of the confusing git checkout command.
To create a new branch based on an older version:
git switch -c temp_branch HEAD~2
To go back to the current master branch:
git switch master