I’m looking at the last 10 or so pushes, and I would like to back out 4 of them (unconsecutive).
How can I do this?
In SVN, it would be a matter of reverting the changes and pushing the “undone” changes back in. Not sure how to do it in Git.
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.
You use
git revert <commit>to revert the offending commits without rewriting history. This creates a new commit that undoes these commits.Instead of
<commit>you use the SHA of each commit you want to revert.