[英]git pull --rebase didn't pull new files from origin
I pulled a package and worked for a while now.我拉了一个包裹,工作了一段时间。 All my changes are done worked fine and before pushing it to remote, I did a git pull --rebase
as I pulled the code long ago and others might have done some changes.我所有的更改都做得很好,在将其推送到远程之前,我做了一个git pull --rebase
因为我很久以前提取了代码,而其他人可能已经做了一些更改。 There were some conflicts which I could resolve manually but there were some new files added to remote repository and pull --rebase doesn't get those new files.有一些我可以手动解决的冲突,但是有一些新文件添加到远程存储库中,而 pull --rebase 没有获得这些新文件。 As a result my package cannot build now, as some of the code changes made by rebase uses those new files.结果我的包现在无法构建,因为 rebase 所做的一些代码更改使用了这些新文件。 Where did I do it wrong?我哪里做错了? Fix please?请修好吗?
Check your current git status to see if the rebase isn't still in progress.检查您当前的 git 状态以查看 rebase 是否仍在进行中。
When you resolve some conflicts during a rebase, you need to add them to the index, and then type git rebase --continue
.当你在 rebase 期间解决一些冲突时,你需要将它们添加到索引中,然后输入git rebase --continue
。 If you don't, Git won't replay all your commits, and the resulting working tree might lack some files.如果不这样做,Git 将不会重放您的所有提交,并且生成的工作树可能会缺少一些文件。
Also check that those new files are indeed part of the upstream branch on top of which your current rebase applies: a pull --rebase
would by default replay your commits on top of origin/yourCurrentBranch
: are new those files part of that origin/yourCurrentBranch
?还要检查这些新文件是否确实是您当前 rebase 应用的上游分支的一部分:默认情况下, pull --rebase
会在origin/yourCurrentBranch
上重放您的提交:是新的那些文件是该origin/yourCurrentBranch
?
I don't really understand git, but I had the same issue and for me a我不太了解 git,但我遇到了同样的问题,对我来说
git pull origin master
helped.有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.