Xcode Project file git merge conflict

前端 未结 8 1425
萌比男神i
萌比男神i 2021-01-31 03:28

In Xcode, what\'s the best way to avoid Git conflict in the project file? (I am in manual git, not using Xcode interface for git)

I\'ve cloned mapbox-ios-sdk from Github

8条回答
  •  走了就别回头了
    2021-01-31 03:37

    I need to get master code in my branch So, I was taking pull from master and I have changed in my .pbxproj file and master has different configuration.So, It was showing conflict in .pbxproj file. Follow these steps to resolve it

    Open .pbxproj in Finder-> Right click on file Choose Show Package Contents-> Choose .pbxproj file and open it with TextEdit-> It will show conflict lines as below.

    <<<<<<< HEAD"
    // head changes
    ===========
    // Your changes
    >>>>>>>>
    

    You have choose the right one from head Changes and your changes and Delete the rest. Now commit you code

    git add .
    git commit -m"conflict resolved"
    git status // Check you files status
    

    If everything is fine the push you code.

    git push
    

提交回复
热议问题