Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot Merge due to conflict with UserInterfaceState.xcuserstate

I created a branch and made a bunch of changes. I committed the changes and then archived the changes. Then I switched to the master branch and tried to do a merge. It said I had uncommitted changes. So I did a commit on the master branch to see what it was talking about. It said that there is a file called UserInterfaceState.xcuserstate that was modified. So I committed the change (not sure what the change was). Then I tried to merge again. It then opens up a merge window and indicates that there is a conflict with UserInterfaceState.xcuserstate. So I went back to the branch and found that that same file is now needing to be committed. This did not show up before. So I committed it and went back to the master branch. Again I tried to merge but cant because of uncommitted changes. Sure enough, UserInterfaceState.xcuserstate is once again needing to be committed. I committed it and tried to merge. Same problem with conflict. Its a vicious circle.

What is this file and how do I resolve the reported conflict. It does not show up in my project navigation window. Furthermore, it is not in the unix file system. I am totally stuck. Suggestions? I am using xcode 4.5.2

like image 480
JeffB6688 Avatar asked Dec 13 '12 23:12

JeffB6688


2 Answers

just remove files using

git rm --cached *xcuserstate

then do a local commit selecting .DS_Store with miscellaneous message

discard all other changes

pull

push

done :)

like image 163
Ankit Sachan Avatar answered Sep 20 '22 09:09

Ankit Sachan


UserInterfaceState.xcuserstate is where Xcode saves your GUI states, such as window positions, open tabs, expanded nodes in the project inspector etc.

Simply resizing the Xcode window will cause this file to change and be flagged as modified by your source control system. You can make your SCM system ignore specific files that are not important to the project itself.

Git: Git ignore file for Xcode projects
Subversion: SVN ignore pattern with Xcode 4

like image 37
DrummerB Avatar answered Sep 20 '22 09:09

DrummerB