I have to use Git and want to undo one commit that was some commits before the tip. In Hg it’s hg backout. What’s the analog command in Git?
(I duckduckwent before posting this and dont’s see an analog command.)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It sounds like you need git revert 🙂 Alternatively, if you want to remove all evidence that that commit ever happened, you could do a git rebase to get rid of it. But be careful if you’ve already published that commit somewhere visible as you can create problems for other people.
Here’s a link talking about revert:
http://gitready.com/intermediate/2009/03/16/rolling-back-changes-with-revert.html
Alternatively, just Google for the manual documentation.