git - remove commits from merged branch
<p>I accidentally pushed a commit with some huge files, and then reverted it. But it causes anyone pulling this branch to fetch these files in history, so I decide to remove or squash these two commits. However, some branch has been merged in. I don't know how to make "git rebase -i" keep the branches structure.</p>

<p>The history now looks like:</p>

<pre><code>H - new commits
|
G - merge
| \
|  F - commits on another branch
|  |
E  | - some other commits
|  |
D  | - corrected B
|  |
C  | - revert B
|  |
B  | - huge files
| /
A - early commit
</code></pre>

<p>Can I change it to following?</p>

<pre><code>h - new commits
|
g - merge
| \
|  F - commits on another branch
|  |
e  | - some other commits
|  |
d  | - corrected B
| /
A - early commit
</code></pre>