为什么 'merge' 不可能?
why the 'merge' is not possible?
我会恢复到以前的提交,所以我 运行 我从这个 answer 得到的这个命令,但我得到了这个:
#git revert -n 91fc9480d110360374e3813a729b4fa31a64c524
git_test.txt: unmerged (af7a07f6e5655100c7a725ef716593a5c0ff4234)
git_test.txt: unmerged (c4c8e23a9649945a03834c259e7471e5c848e6c7)
git_test.txt: unmerged (78b6f029e42ad16f82827bf93d286f47d3b6d79a)
fatal: Your index file is unmerged.
任何人都可以解释一下我在这里做了什么,因为我刚得到这个:
# git merge b2
fatal: 'merge' is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>' as
appropriate to mark resolution and make a commit, or use 'git commit -a'.
还原会导致 "merge" 冲突以及真正的合并。您应该在编辑器或合并工具中解决冲突,然后 git add
已解决的文件,并使用 git revert --continue
完成还原。只要您有未合并的文件,就不应执行任何其他操作,并且 git 本身会阻止大部分操作。
虽然在你的情况下你可能不应该 运行 命令,请参阅我的评论。
我会恢复到以前的提交,所以我 运行 我从这个 answer 得到的这个命令,但我得到了这个:
#git revert -n 91fc9480d110360374e3813a729b4fa31a64c524
git_test.txt: unmerged (af7a07f6e5655100c7a725ef716593a5c0ff4234)
git_test.txt: unmerged (c4c8e23a9649945a03834c259e7471e5c848e6c7)
git_test.txt: unmerged (78b6f029e42ad16f82827bf93d286f47d3b6d79a)
fatal: Your index file is unmerged.
任何人都可以解释一下我在这里做了什么,因为我刚得到这个:
# git merge b2
fatal: 'merge' is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>' as
appropriate to mark resolution and make a commit, or use 'git commit -a'.
还原会导致 "merge" 冲突以及真正的合并。您应该在编辑器或合并工具中解决冲突,然后 git add
已解决的文件,并使用 git revert --continue
完成还原。只要您有未合并的文件,就不应执行任何其他操作,并且 git 本身会阻止大部分操作。
虽然在你的情况下你可能不应该 运行 命令,请参阅我的评论。