Rollback to an old Git commit in a public repo
问题 How can I go about rolling back to a specific commit in git? The best answer someone could give me was to use git revert X times until I reach the desired commit. So let\'s say I want to revert back to a commit that\'s 20 commits old, I\'d have to run it 20 times. Is there an easier way to do this? I can\'t use reset because this repository is public. 回答1: Try this: git checkout [revision] . where [revision] is the commit hash (for example: 12345678901234567890123456789012345678ab ). Don't