我正在尝试合并,deleted by us
标题下有几个Unmerged paths:
的文件。它对use "git add/rm <file>..." as appropriate to mark resolution
说。
奇怪的是,我认为上次我被对象删除时,我使用了mergetool
,它会询问我是要删除它还是取本地,但mergetool
不起作用,它陈述No files need merging
。我尝试过的其他事情是:
git add _filename_
会导致文件被添加到舞台区域。不是我想要的。git rm _filename_
会产生fatal: pathspec '_filename_' did not match any files.
git rm -f _filename_
它会删除文件,但是我应该怎么做呢?我觉得在我的本地存储库中有些东西已经消失了。任何人都可以确认吗?
答案 0 :(得分:0)
一个简单的git rm
应该足够了(虽然它有点抱怨)。我为名为file
的文件
$ git merge sidebr
CONFLICT (modify/delete): file deleted in HEAD and modified
in sidebr. Version sidebr of file left in tree.
Automatic merge failed; fix conflicts and then commit the result.
$ git status
On branch master
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by us: file
no changes added to commit (use "git add" and/or "git commit -a")
$ git rm file
file: needs merge
rm 'file'
$ git status
On branch master
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
如果您的情况不同,如果您提供了更多设置信息和/或实际会话的记录,如上所述,将会有所帮助。