Craig
Craig

Reputation: 556

Source Control merge button grayed out?

At my workplace we have set up GIT source control. We made a new branch off of the master and altered pretty much all of the code in a few modules.

When we came to merge it the merge button in the source comparison window was greyed out?

We had already made some changes in that branch and merged them, so would that stop us making other changers and merging the branch again?

We're all pretty confused by this and kind of hoping somebody knows ANY reason why the merge button may be greyed out and we can see if that applies?

Upvotes: 7

Views: 9527

Answers (4)

Womble
Womble

Reputation: 5290

If using Xcode 11...

I found that SCM menu items were dimmed out, both in the "Source Control" menu and from within the Source Control Navigator (Pane 2).

Solution:

Go to the Source Control Navigator (Pane 2)

Select a Branch (e.g. "master"), then:

Editor -> Branch -> Merge "someBranch" in to "master"

Upvotes: 3

tameikal
tameikal

Reputation: 186

I'm working with Xcode 9.2 and had the problem of the "Merge" button grayed out. I don't have the "file view"/blue menu highlighted in the above screen shot.

In my case: I was merging two non-master branches and I missed resolving some of the conflicts in the larger files by not toggling the "?" to select the version I wanted to keep. Once every red block conflict in every file marked "C" was toggled, "Merge" was available.

Upvotes: 0

Jeffrey Sun
Jeffrey Sun

Reputation: 8049

Make sure to check the "File View" in the upper-left hand corner for more files that may have conflicts.

The default place you're looking at for resolving merge issues is the "Project View", which contains all project files. But especially if you are merging from/into another branch, there may be other more hidden (non-code) files that have been changed.

So switch to the "File View" to check for conflicts there as well. (it's located in the upper-left hand corner of the merge resolving screen)

The flat view also makes it easy to find hidden files with conflicts.

Upvotes: 18

Bellovic
Bellovic

Reputation: 76

I've experienced a similar issue after creating a branch and then attempting to 'merge branch into' the master.

In the window with the greyed out merge button I found if you deselect the blue highlighted branch to merge into (in my case 'master') by clicking in the space below, then select it again the merge button becomes available.

I know this doesn't answer why it's happening but as least merging can be used inside xcode again.

Upvotes: 3

Related Questions