Why is the merge tool disabled in Eclipse for a EGit-managed project?

前端 未结 6 2355
醉梦人生
醉梦人生 2021-02-19 07:49

As per the EGit User Guide, to use the merge tool, one should right-click on the resource with a merge conflict and then select Team > Merge Tool

相关标签:
6条回答
  • 2021-02-19 08:05

    This happens if you tried to push changes to a remote and there were merges required from the remote. It fails with 'not FF' but also simultaneously detects the conflict. Don't ask me why it doesn't mark the whole project as conflicted at this point.

    Open the Synchronize tab, right-click the project and select 'merge'. This immediately fails because of the conflicting file, and it switches on the conflict icon label for the project and enables the 'merge tool' option.

    This is for EGit 4.0.3 in Eclipse Mars.

    0 讨论(0)
  • 2021-02-19 08:07

    The only time (other than a bug) that the Merge Tool would be disabled is that when you are in any status other than the Conflicts one; i.e. you will only see that option enabled when the status is Conflicts. The status is shown next to the project name in most views, such as Project Explorer and Synchronize.

    Make sure you have merged with desired branch, then if your merge results in conflicts, your project will enter Conflicts mode, and the Merge Tool will be enabled.

    0 讨论(0)
  • 2021-02-19 08:13

    This also happens if you're in detached head state (in my case, I had checked out a remote branch and then forgotten).

    Also, even after you've corrected the problem, you may have to select a different project and then reselect the one you actually want (just selecting in the package explorer view) in order for the menu to update.

    0 讨论(0)
  • 2021-02-19 08:15

    It was disabled for me because I had some changes on my stash list.

    $ git stash clear
    

    fixed the problem for me.

    0 讨论(0)
  • 2021-02-19 08:27

    It seems to be a bug in EGit as VonC mentioned, but the fix is easy. I did it using reset branch option on the same menu that Cherry Pick option existed.

    Note: git stash clear didn't help.

    0 讨论(0)
  • 2021-02-19 08:29

    It can depend on the version of EGit you are using, and on the operation that lead to the conflict.
    See for instance bug 339092 which mention merge tool being not enabled in the case of a conflict after cherry-picking: only the just released EGit 0.12 would support that.

    0 讨论(0)
提交回复
热议问题