My Xcode Is Showing Two Branches Open At Same Time In Source Control
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
Answer
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.
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.
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.
Open your project in XCODE and you shouldn't see your undesired branch anymore in the 'Source Control' menu.
Added Explanation
@Muthu Selvam :
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 ???).
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).
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.
Same as step 3 in the titled dictionary "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" (line 12).
Last but not least, remove the entire 2 dictionaries in the titled array "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" (line 20).
It should work. :o)
Related Questions
- → Function Undefined in Axios promise
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Click to navigate on mobile devices
- → Playing Video - Server is not correctly configured - 12939
- → How to allow api access to android or ios app only(laravel)?
- → Axios array map callback
- → Access the Camera and CameraRoll on Android using React Native?
- → Update React [Native] View on Day Change
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → React Native - Differences between Android and IOS
- → What is the difference between React Native and React?