Xcode can't merge feature branch back into master branch "The source control operation failed because the file ___ could not found

Viewed 1085

I currently have 2 branches, the master branch, and a feature branch. The feature branch is complete so I'd like to merge them by basically overriding the master branch with the feature branch.

However, when I open up the merge window, I have a blank editor and a lot of files on the left have a red square with a C

Whenever I clock on a file with the red warning, I get an error message saying:

The same error appears for every file. What should I do in order to be able to merge my two branches?

Some other notes that may be important:

  • My repository is remote.
  • I reorganized the files and folders on the feature branch.
  • Both the master branch and the feature branch still compile and run successfully.
1 Answers

In that particular case, it is best to switch to Git in command-line, instead of trying to emulate the scenario in XCode:

cd /path/to/repo
git checkout feature_branch
git merge -s ours master
git checkout master
git merge feature_branch

Then you can go on with XCode, and push your master branch.

Related