为什么git pull --rebase在重放现有提交时失败? [英] Why does git pull --rebase fail when replaying existing commits?

查看:233
本文介绍了为什么git pull --rebase在重放现有提交时失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有得到这个:当我'git pull --rebase remote branch'时,它会将我的HEAD恢复回它们的共享根目录,然后开始重播在此期间发生的所有远程提交。为什么这些提交有时会失败?他们是干净的工作区干净的承诺?这几乎不是重新定义的要点吗?

你确定它不是你的 提交失败?



假设您正在处理分支并对特定文件进行一系列更改。



现在您想要将您的提交重定义到任何遥控器的头部。



所有的更改都会被删除,然后所有的更改都会被应用,然后所有的更改都是重新应用于此。那么,如果他们删除了你正在处理的文件呢?或者做出其他更改,使您的更改无法应用?


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?

解决方案

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?

这篇关于为什么git pull --rebase在重放现有提交时失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆