 <p>Let's say that you have branches <code>A</code>, <code>B</code>, and <code>develop</code> in your local git repository. In order to have <code>develop</code> contain all commits except the large-scale deleting commit, do the following:</p> <pre><code>git checkout develop git rebase -i A </code></pre> <p>You will then get a screen that gives you a list of all your commits since the head of branch <code>A</code>. Delete the line with the commit you don't want, and then save the file (usually the interface is in <code>vi</code>, so entering <code>:wq</code> will save and quit. Check out <code>vi</code> documentation for more details). Once you've done that, the <code>develop</code> branch will now have all the commits except the big deletion. Don't worry, though, because <code>B</code> will still have the delete commit, and you can always go back to it by checking out branch <code>B</code> if you want.</p> <p>Caveats: you may end up with some conflict or other as a result of doing these operations. Also, there is no guarantee that you code will actually work; git is a text tool, not a "code" tool per-se.</p>