为什么重放现有提交时 git pull --rebase 会失败?

发布于 2024-09-07 18:17:29 字数 121 浏览 4 评论 0原文

我不明白:当我“git pull --rebase 远程分支”时,它会将我的 HEAD 恢复到其共享根,然后开始重放同时发生的所有远程提交。为什么这些提交有时会失败?它们是干净工作区上的干净提交吗?这不就是rebase的重点吗?

I don't get this: when I 'git pull --rebase remote branch' it reverts my HEAD back to their shared root and then starts replaying all of the remote commits that have happened in the meantime. Why do these commits sometimes fail? They are clean commits on a clean workspace? Isn't that almost the point of rebasing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

§对你不离不弃 2024-09-14 18:17:29

您确定这不是您的提交失败吗?

假设您正在一个分支上工作并对特定文件进行大量更改。

现在你想将你的提交重新定位到遥控器的头部。

您的所有更改都将被删除,然后应用所有更改,然后在此基础上重新应用您的所有更改。那么如果他们删除了您正在处理的文件怎么办?或者进行了其他更改,导致您的更改无法应用?

Are you sure it isn't your commits failing?

Suppose you are working on a branch and make a bunch of changes to a specific file.

Now you want to rebase your commits on to whatever the head of the remote is.

All of your changes are removed, then all of theirs are applied, then all of your changes are re-applied on top of that. So what if they deleted the file you're working on? Or otherwise made changes that make your changes impossible to apply?

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