Another developer created a branch, worked on it, and checked in code. He also did a merge from that branch to the master. Before cloning I see the merged files in the master. But after cloning from master via xcode, it did not pull the files that were checked into branch and subsequently merged into master. I thought after merge anyone should be able to checkout master and clone and get all the merged files. But that is not happening. How to pull the entire merged code? When I run git status, I get this output:
On branch master Your branch is up to date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: xyz/xyz.xcodeproj/project.pbxproj modified: xyz/xyz.xcodeproj/project.xcworkspace/xcuserdata/HCCS.xcuserdatad/UserInterfaceState.xcuserstate modified: xyz/xyz/Base.lproj/Main.storyboard Untracked files: (use "git add <file>..." to include in what will be committed) MyPlayground.playground/playground.xcworkspace/ MyPlayground2.playground/playground.xcworkspace/ compare.playground/playground.xcworkspace/ no changes added to commit (use "git add" and/or "git commit -a") I am at loss to understand the error and why it is not pulling all the files when cloned.
Some more details:
git pull error: Your local changes to the following files would be overwritten by merge: r2nr/r2nr.xcodeproj/project.pbxproj r2nr/r2nr/Base.lproj/Main.storyboard Please commit your changes or stash them before you merge. error: The following untracked working tree files would be overwritten by merge: MyPlayground.playground/playground.xcworkspace/contents.xcworkspacedata MyPlayground2.playground/playground.xcworkspace/contents.xcworkspacedata compare.playground/playground.xcworkspace/contents.xcworkspacedata Please move or remove them before you merge. Aborting I ran git stash
git stash 'Saved working directory and index state WIP on master: 6d9b3d2 Merge branch 'branch01' Added ProviderApiCaller class to the code HCCS@CEASJ311-4293 green-synapse % git pull Updating 6d9b3d2..35d2b7e error: The following untracked working tree files would be overwritten by merge: MyPlayground.playground/playground.xcworkspace/contents.xcworkspacedata MyPlayground2.playground/playground.xcworkspace/contents.xcworkspacedata compare.playground/playground.xcworkspace/contents.xcworkspacedata Please move or remove them before you merge. Aborting So I removed the three files:
MyPlayground.playground/playground.xcworkspace/contents.xcworkspacedata MyPlayground2.playground/playground.xcworkspace/contents.xcworkspacedata compare.playground/playground.xcworkspace/contents.xcworkspacedata Next
git pull That seemed to work
Then I enter xcode project I get error
The project ‘r2nr’ is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts. Path: /Users/HCCS/myproj/r2nr/r2nr.xcodeproj. How to resolve conflicts? *
modified:path names appears in both upper and lower case due to the other developer using a case-sensitive file system (probably on Linux, but you can create them on macOS). That could produce some of the above right aftergit clone.