Git pull:错误:输入foo不是uptodate。无法合并 [英] Git pull: error: Entry foo not uptodate. Cannot merge
问题描述
我试图从远程分支更新我的repo,并在执行git pull时不断收到此错误。我没有做出任何本地更改,即使我已经不需要保留它们。
我试过了:
git reset --hard
和我遇到同样的问题
唯一可行的是删除违规文件并再次尝试使用git pull。
我也尝试过 git stash
,接着是 git pull
。编辑:使用PortableGit-1.6.4-preview20090729,因此任何以前的虚假错误应该修复。
有几种方法可以解决这个问题,但我发现git存储对我很有用。它临时将您的本地更改放到另一个地方。然后,您可以拉动,抓住最新的变化。然后你可以回到你的本地变更。
就像这样:
$ git pull
...
...
文件your_file.rb不是最新的,无法合并。
$ git stash
$ git pull
$ git stash pop
I'm trying to update my repo from a remote branch and keep getting this error when I do a "git pull". I haven't made any local changes, and even if I have I don't need to keep them.
I've tried:
git reset --hard
and I get the same problem
The only thing that seems to work is deleting the offending file and try a git pull again.
I've also tried git stash
followed by a git pull
. No go.
edit: using PortableGit-1.6.4-preview20090729 so any previous bugs with spurious errors should be fixed.
There's a couple of ways to fix this but I've found git stash works good for me. It temporary puts your local changes into another place. Then you can pull, to grab the latest changes. And then you can get your local changes back.
Just like this:
$ git pull
...
...
file your_file.rb not up to date, cannot merge.
$ git stash
$ git pull
$ git stash pop
这篇关于Git pull:错误:输入foo不是uptodate。无法合并的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!