为什么我会与 git rebase -p -i 发生冲突?

发布于 2024-08-09 11:28:04 字数 225 浏览 2 评论 0原文

我正在使用

 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

似最初 2024-08-16 11:28:05

提交绝不只是一个文件。提交是指当时的整个树。根据您尝试移动的提交和您尝试将其移动到的提交的共同合并基础,可能会有相当多的更改。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文