Using a public repo, I want to get my master branch back to a certain commit from the past. I have reviewed the options and the best thing for me looks to be a simple checkout t
Do you want to roll back your repo to that state? Or you just want your local repo to look like that?
See https://git-scm.com/docs/git-reset for git reset.
CASE 1: if you do
git reset --hard [commit hash]
It will make your local code and local history be just like it was at that commit. But then if you wanted to push this to someone else who has the new history, it would fail.
CASE 2: if you do
git reset --soft [commit hash]
It will make your local files changed to be like they were then, but leave your history etc. the same.
I found answer here. Also you can see related answer here.