How can I roll back 1 commit?
- by n179911
I have 2 commits that I did not push:
$ git status
# On branch master
# Your branch is ahead of 'faves/master' by 2 commits.
How can I roll back my first one (the oldest one), but keep the second one?
$ git log
commit 3368e1c5b8a47135a34169c885e8dd5ba01af5bb
...
commit baf8d5e7da9e41fcd37d63ae9483ee0b10bfac8e
...
From here:
http://friendfeed.com/harijay/742631ff/git-question-how-do-i-rollback-commit-just-want
Do I just need to do:
git reset --hard baf8d5e7da9e41fcd37d63ae9483ee0b10bfac8e
That is?