xcode 源代码管理合并按钮变灰?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20654464/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:27:11  来源:igfitidea点击:

Source Control merge button grayed out?

iosxcodegitversion-controlmerge

提问by Craig

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.

在我的工作场所,我们设置了 GIT 源代码控制。我们从 master 上创建了一个新分支,并更改了几个模块中的几乎所有代码。

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?

我们都对此感到非常困惑,并希望有人知道合并按钮可能变灰的任何原因,我们可以看看这是否适用?

采纳答案by Bellovic

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

在创建分支然后尝试将分支“合并到”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.

在带有灰色合并按钮的窗口中,我发现如果您通过单击下面的空间取消选择要合并到的蓝色突出显示的分支(在我的情况下为“master”),然后再次选择它,合并按钮将变为可用。

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

我知道这并不能回答为什么会发生这种情况,但至少可以在 xcode 中再次使用合并。

回答by Jeffrey Sun

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.

平面视图还可以轻松找到存在冲突的隐藏文件。

回答by tameikal

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.

我正在使用 Xcode 9.2 并且遇到了“合并”按钮变灰的问题。我没有在上面的屏幕截图中突出显示“文件视图”/蓝色菜单。

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.

就我而言:我正在合并两个非主分支,但我没有通过切换“?”来解决较大文件中的一些冲突。选择我想保留的版本。一旦标记为“C”的每个文件中的每个红色块冲突都被切换,“合并”就可用了。