Github for Windows features these two commands described as:
revert this commit
- create a new commit that reverts the changes of this commitIs it possible to revert to a previous commit check it out and if I don't like it, go back to where it was initially?
It is now (March 2013), with GitHub for Windows, you can undo a rollback without having to type any git command:
See "Undo Button in GitHub for Windows"
we've added Undo support for Discards, Commits, Rollbacks, and Merges:
Suppose you have a single file in your repo, and you have the following commits:
commit 1 : the file contains A
commit 2 : the file contains B
commit 3 : the file contains C
If you execute revert on commit 3
, you'll have this in the repo:
commit 1 : the file contains A
commit 2 : the file contains B
commit 3 : the file contains C
commit 4 : the file contains B
And the file in your working copy will contain B as well.
If you execute roll back, you'll have this in the repo:
commit 1 : the file contains A
commit 2 : the file contains B
And the file in your working copy will be left unmodified. The file will thus contain C. It allows you to fix a small mistake and commit again, for example.