为什么我会与 git rebase -p -i 发生冲突?
我正在使用
git rebase -p -i SHA1^
并将单个提交及时向后移动到 SHA1 之后。提交由一个 WAV 文件组成,因此这不可能破坏我的代码。
看似不相关的文件在后来的历史冲突中突然出现。在这种情况下,为什么我会在变基期间遇到这些冲突? -p 不足以保持与历史其他部分的关系完整吗?有一些关于变基的事情我在这里没有完全理解......
I'm using
git rebase -p -i SHA1^
And moving a single commit backwards in time to just after SHA1. The commit consists of a WAV file, so there's no way this is breaking my code.
Seemingly unrelated files pop up in conflicts later in history. Why am I getting these conflicts during the rebase in this scenario? Isn't -p enough to keep the relationship to other parts of history intact ? There is something about rebasing I'm not catching totally here...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提交绝不只是一个文件。提交是指当时的整个树。根据您尝试移动的提交和您尝试将其移动到的提交的共同合并基础,可能会有相当多的更改。
A commit is never just a single file. A commit is the entire tree as of that moment. And depending on the common merge base of the commit your trying to move and the commit you're trying to move it onto, there could be quite a few changes.