Git - How to checkout a specific commit

You can use ´git checkout ` in order to checkout your code at a specific commit. Like below:

git checkout a06348e5

If you use git status after the checkout you will see the message "HEAD detached at <sha1>". In order to return to master you can use:

git checkout <branch>

Normally the above would just be git checkout master but your main branch may be called something different. In Azure devops for example it is sometimes called "main".

I hope this helps someone out there :)