我正在分支X
。我做了一个提交并推送它。然后我想cherry-pick
它分支Y
。但由于一些未合并的文件提出,我得到了以下信息:'致命:樱桃挑选失败'与Git
error: 'cherry-pick' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: cherry-pick failed
现在,我只是想删除我的分支Y
,然后重新创建分支Y
,然后需要手动编辑我在那里的文件试图挑选樱桃。
目前,我无法删除分支,因为它是我的工作分支。 我不能checkout
任何其他分支。我在尝试更改分支时遇到以下错误。
mod/assign/locallib.php: needs merge
error: you need to resolve your current index first
我只需要删除分支Y
,没有分支X
失去任何东西。
编辑#1
我编辑的文件mod/assign/locallib.php
做git status
,我得到:
# On branch MDL-38267_24
# Unmerged paths:
# (use "git add/rm <file>..." as appropriate to mark resolution)
#
# both modified: mod/assign/locallib.php
#
我应该git add ..
添加是什么文件?
请参阅我的编辑我的问题作出。我的意思是我修改的文件和'git status'返回的文件是一样的。我应该如何解决我遇到的问题? – xan 2013-05-08 15:05:51
你需要解决冲突或'git reset'文件到非冲突状态。取决于你做了什么导致冲突。 – Schleis 2013-05-08 16:40:37