Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve git pull conflicts in xcode ui

I am using the Xcode repository GUI with the latest version of Xcode instead of the command line. I did an initial pull of the rep without a problem. I made some changes to the local files. At the same time, my other developer made some changes. I committed my changes to the local rep but needed his changes to do a proper build. We only have 1 branch.

I tried to pull and the Xcode UI reports 6 conflicts (which is what I would expect as I need the 6 files to do the proper build).

My question is how to resolve the conflicts? I read online I should be able to use the left and right button at the bottom of screen to let me pick which file version. I went through all of the 6 files and used the proper buttons to choose which changes I wanted.

However the Pull button in the lower right hand corner is disabled and greyed out.

like image 515
Greg Svitak Avatar asked May 14 '12 22:05

Greg Svitak


2 Answers

Above the file listing of the commit screen are three icons, a directory view, a documents view and the last one which looks like some horizontal lines. When I had a similar issue, I found that clicking on these revealed other files I had not yet resolved.

I resolved those I could although noted that some of these files included some .DS-Store 's which are hidden Apple (Desktop Services Store) files which have been noted elsewhere of causing git issues.

I placed the .DS_Store into .gitignore using the instructions at How can I Remove .DS_Store files from a Git repository?

That fixed it for me.

like image 123
James Avatar answered Nov 17 '22 19:11

James


In my case, I just had more conflicts further down that I didn't see. Strangely, since using Xcode 6 this is the first time I've actually had to deal with conflicts -- and I made them! (on a different machine)

At any rate, just scrolling down a bit more revealed that there were more conflicts in the file and once I chose "right" or "left" (or "right then left"/"left then right"), the "Pull" button enabled and I was able to complete my pull...

Whew! Hope this helps!

like image 26
Evan K. Stone Avatar answered Nov 17 '22 21:11

Evan K. Stone