简体   繁体   English

git pull --rebase 没有从原点拉取新文件

[英]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.

相关问题 git pull --rebase原始标记名? - git pull --rebase origin tagname? 为什么git pull origin development不进行-rebase会导致冲突? - Why does git pull origin develop --rebase cause conflict when git pull origin develop doesn't? git pull origin master 导致暂存其他我什至没有修改的文件 - git pull origin master resulted in staging other files that I didn't even modify Git rebase local vs git pull --rebase origin - Git rebase local vs git pull --rebase origin “git pull origin develop --rebase”和“git pull --rebase origin develop”之间的区别 - Difference between 'git pull origin develop --rebase' and 'git pull --rebase origin develop' git pull --rebase origin master似乎每次都会从一开始就重新设置基准 - git pull --rebase origin master appears to rebase from the beginning every time 如果不再使用本地分支,我应该使用 `git pull --rebase origin master` 还是 `git rebase origin/master`? - Should I use `git pull --rebase origin master` or `git rebase origin/master` if the local branch won't be used anymore? Git fetch 和 git pull 没有从远程仓库复制文件 - Git fetch and git pull didn't copy files from remote repo git pull --rebase --autostash 在冲突中丢失文件 - git pull --rebase --autostash losing files on conflict 如何还原由git pull rebase删除的文件 - How to restore files deleted by git pull rebase
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM