I have a local branch named Foo set to track its remote branch named Foo on the upstream named origin.
I'd like to temporarily checkout an old commit of Foo, look at a few things, and then after I have just looked at the old code, get back to my latest, most recent commit.
To amplify, I am not after getting back the HEAD set to an older commit. I do not want to reset the HEAD of my repo. I just want to look at the older commit, and then get back to where I am in the present.
I have done this in the past several times but I have only a vague memory and so I'd like to confirm before I do it again. It was, I think:
$ git checkout {branchName}
$ git checkout {commitId}
Is that right?
I know that I can also browse the files in the old commit via the GitHub Web-based interface but I'd still like to checkout the older commit because there are way too many changes and the usability of the Web interface won't be good enough for me to look at all those changes.