I just realized I introduced a memory leak somewhere in the last 8 commits.
Easiest solution is to revert to 8 commits ago, then carefully add the changes
back in. What is the easiest way of doing this?
Thanks!
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.
Take a look at
git bisect. It sounds like exactly what you are looking for.Basically, you tell it a known good point and a known bad point in your history, and then it helps you perform a binary search until you find the offending commit.
Here’s a tutorial on its use: http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#using-bisect
But, if you don’t want to do it that way, create a temporary branch where you are right now and either do a bunch of
git reset HEAD^to go up one commit at a time, or dogit reset HEAD~8and thengit cherry-pick <sha1>for each subsequent commit between you and your temporary commit.