我意外地推送了一些大文件的提交,然后将其恢复。但它会导致任何人拉这个分支来获取历史中的这些文件,所以我决定删除或挤压这两个提交。但是,有些分支已经被合并了。我不知道如何让“git rebase -i”保持分支结构。git - 从合并分支中移除提交
历史现在看起来像:
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
我可以将其更改为以下?
h - new commits
|
g - merge
| \
| F - commits on another branch
| |
e | - some other commits
| |
d | - corrected B
|/
A - early commit
有另一方重做合并的可能吗? –
@TimBiegeleisen是的,但必须保持结构。 – Xiao
交互式重新分配并移除“巨大文件”和“还原B”。然后重新合并。最后,挑选出新的承诺。 –