我的xcode显示了在源代码管理中同时打开两个分支 [英] My xcode is showing two branches open at same time in source control

查看:171
本文介绍了我的xcode显示了在源代码管理中同时打开两个分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的xcode显示了在源代码管理中同时打开的两个分支.我想从中删除一个光荣.因为当我切换分支时它正在产生一些未提交的更改.屏幕截图已随附.感谢您的帮助. 其他详细信息Xcoed版本:7.1

My xcode is showing two branches open at same time in source control. i want to remove one brance from that. because it was producing some uncommited changes when i switch branch. Screenshot is attached. Thanks for your help in advance. Additional details Xcoed Version : 7.1

推荐答案

我遇到了同样的问题,并且发现了如何在这种环境下删除不需要的分支:XCODE 7.3(7D175)以及使用CocoaPods生成了".xcworkspace"文件

I had the same issue and found out how to remove the undesired branch under this environment : XCODE 7.3 (7D175) and use of CocoaPods generating '.xcworkspace' file.

以下步骤是查找和删除分支的方法: 1.找到"MyApplication.xcworkspace"文件. 2.例如,使用TextWrangler打开此文件(以下步骤必须在所选的编辑器中完成). 3.您应该看到两个文件夹:"xcshareddata"和"xcuserdata".展开"xcshareddata". 4.选择并打开"MyApplication.xcsmblueprint"文件.

Following the steps hereafter is the way to find and remove the branch : 1. Locate the 'MyApplication.xcworkspace' file. 2. Open this file with TextWrangler for instance (the following steps must be done in the chosen editor). 3. You should see two folders : 'xcshareddata' and 'xcuserdata'. Unfold 'xcshareddata'. 4. Select and open the 'MyApplication.xcsmblueprint' file.

现在,您应该看到一些要删除的分支被写入的行. 在"DVTSourceControlWorkspaceBlueprintIdentifierKey"部分中记下其ID,然后选择它出现的所有行,以便同时删除它们. 这些行位于字典中.

Now, you should see some lines where the branch you want to remove is written. Note its ID in the 'DVTSourceControlWorkspaceBlueprintIdentifierKey' section and then select all the lines where it appears so as to delete them at the same time. These lines are located in kind of dictionaries.

在XCODE中打开您的项目,并且在源代码管理"菜单中不应再看到不需要的分支.

Open your project in XCODE and you shouldn't see your undesired branch anymore in the 'Source Control' menu.

@Muthu Selvam:

@Muthu Selvam :

  1. 在".xcscmblueprint"文件中,查看标题为"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey"的字典(第12行).您会注意到您有3个Id作为键,并且有名称作为值. 在这里,这意味着您显然有3个不同的分支,其中两个具有相同的名称(奇怪的???).

  1. In your '.xcscmblueprint' file, take a look at the titled dictionary "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" (line 12). You notice you have 3 Ids as keys and names as values. Here, it means you have 3 different branches apparently and two of them having the same name (weird ???).

现在,如果您看一下标题为"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey"的字典数组(第20行),则将在专用词典中对3个分支中的每个分支进行详细介绍. 在这里,您会看到要保留的内容和必须删除的内容(请查看每本词典中的"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey").

Now, if you take a look at the titled array of dictionaries "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" (line 20), each of your 3 branches is deeply described in a dedicated dictionary. That's here you see the one you want to keep and those you have to remove (look at the "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" in each dictionary).

选择了要删除的2个分支的ID后,看一下标题词典"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey"(第6行),然后删除2个不需要的行,其中包括2个不需要的ID.

Once you have selected the IDs of the 2 branches you want to delete, take a look at the titled dictionary "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" (line 6) and remove the 2 undesired lines including the 2 undesired IDs.

与标题词典"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey"(第12行)中的步骤3相同.

Same as step 3 in the titled dictionary "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" (line 12).

最后但并非最不重要的一点是,删除标题数组"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey"(第20行)中的全部2个字典.

Last but not least, remove the entire 2 dictionaries in the titled array "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" (line 20).

应该可以. :o)

这篇关于我的xcode显示了在源代码管理中同时打开两个分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆