为什么我有时会看到“Entry'文件名'不是最新的。无法合并。“在'git reset --hard'和'git pull'之后? [英] Why do I sometimes see an "Entry 'filename' not uptodate. Cannot merge." after a 'git reset --hard' and a 'git pull'?

查看:590
本文介绍了为什么我有时会看到“Entry'文件名'不是最新的。无法合并。“在'git reset --hard'和'git pull'之后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

偶尔,当我做以下事情时:

  git reset --hard 
HEAD现在在0123abde comment在这里



  git pull 
更新0123abde..456789fa

我得到错误...

 错误:条目'文件名'不是uptodate。无法合并。 

我找到的唯一解决方法是'git reset --hard',删除违规文件)然后做'混帐拉'。这对我来说并不合适。不应该硬重置删除任何和所有本地更改,从而允许我拉最新,没有任何合并问题?我使用混帐错误? :)



这是在CI机器上,所以这里的任何更改都是不需要的。我在Windows Vista上使用git版本1.6.1.9.g97c34。

解决方案

条目'文件名'不是uptodate。无法合并。 是:


您对工作目录中的文件进行了更改,如果结账和更改将被覆盖,删除或以其他方式丢失新分行将继续进行。


已被举报,此消息可能在时间上虚假(可能是因为 git pull 在尝试合并之前,未刷新索引),但修复是在Git1.6.1。

但是,它可能仍然在mSysGit 1.6.1中,所以你看到相同的错误与更新的mSysGit版本? (如1.6.3)

Occasionally, when I do the following...

git reset --hard
HEAD is now at 0123abde comment is here

git pull
Updating 0123abde..456789fa

I get the error...

error: Entry 'filename' not uptodate. Cannot merge.

The only workaround I have found is to 'git reset --hard', delete the offending file(s) then do 'git pull'. That doesn't seem right to me. Shouldn't a hard reset remove any and all local changes thus allowing me to pull the latest without any merge issues? Am I using git wrong? :)

This is on a CI machine so any changes here are unwanted. I'm using git version 1.6.1.9.g97c34 on Windows Vista.

解决方案

The general idea behind "Entry 'filename' not uptodate. Cannot merge." is:

You have changes to files in your working directory that will be overwritten, removed or otherwise lost if the checkout and change to the new branch were to proceed.

It has been reported that this message could be "spurious" at time, (potentially because "git pull" did not refresh the index before trying to merge) but the fix was in Git1.6.1.
However, it may still be in mSysGit 1.6.1, so do you see the same error with a more recent mSysGit version ? (like 1.6.3)

这篇关于为什么我有时会看到“Entry'文件名'不是最新的。无法合并。“在'git reset --hard'和'git pull'之后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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