github自动生成评论

时间:2015-12-29 14:47:11

标签: java eclipse git github

我最近尝试通过github桌面应用程序将我的本地github分支恢复到早期版本。它给了我错误

error: revert is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: revert failed
 (128)

然后当我在Eclipse中打开我的项目时,我收到了诸如

之类的评论
<<<<<<< HEAD

and

=======
>>>>>>> parent of [something]... Merge branch 'master' into robertsBranch

这些会导致各种语法错误。如何撤消此操作并返回到我的分支的先前版本,而不会产生这些错误生成注释,并且没有错误消息。是不是可以和github分支一起回到过去?

1 个答案:

答案 0 :(得分:1)

  

如何撤消此操作并返回到我的分支的先前版本,而不会产生这些错误生成注释,并且没有错误消息。

这些不是评论。他们重新merge conflict indicators,显示存在合并冲突的位置。

  

是否可以和github分支一起回到过去?

如您收到的错误消息所示,当您尝试将master合并到robertsBranch时,会出现这些冲突。你必须决定合并是否重要(在这种情况下你必须manually resolve the conflicts)(在这种情况下你可以abort the merge继续revert)。