相关疑难解决方法(0)

为什么我有时会看到"条目'文件名'不是最新的.无法合并." 在'git reset --hard'和'git pull'之后?

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

git reset --hard
HEAD is now at 0123abde comment is here
Run Code Online (Sandbox Code Playgroud)
git pull
Updating 0123abde..456789fa
Run Code Online (Sandbox Code Playgroud)

我收到了错误......

error: Entry 'filename' not uptodate. Cannot merge.
Run Code Online (Sandbox Code Playgroud)

我找到的唯一解决方法是'git reset --hard',删除有问题的文件,然后执行'git pull'.这对我来说似乎不对.不应该硬重置删除任何和所有本地更改,从而允许我拉出最新的没有任何合并问题?我使用git错了吗?:)

这是在CI计算机上,因此这里的任何更改都是不需要的.我在Windows Vista上使用git版本1.6.1.9.g97c34.

git merge pull reset

17
推荐指数
4
解决办法
2万
查看次数

标签 统计

git ×1

merge ×1

pull ×1

reset ×1