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
Git checkout will not remove files added since a previous commit. To do this I would need git revert.
git revert
However I find git checkout thehash . a lot easier to use, and its not so hard to see which files have been added since that hash:
git checkout thehash .
git diff --name-status HEAD thehash