Pregunta

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

¿Fue útil?

Solución 2

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

Otros consejos

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 :)

I tried all the commands does not help me. So i thought to delete in directory.

Right Click on xcode Project File -> Show Package Contents -> project.xcworkspace -> Right Click on xcworkspace File -> Show Package Contents -> xcuserdata -> mac"mac is an system name".xcuserdatad -> UserInterfaceState.xcuserstate -> Delete your headache here i mean UserInterfaceState.xcuserstate file.

then commit using commands and do as usual procedure.

Simple Run below CMD-

git rm --cached [HERE ENTER YOUR UserInterfaceState.xcuserstate PATH YOU CAN COPY AND PASTE PATH FROM TERMINAL WARNING]

like in my case:

git rm --cached CabAppUser.xcworkspace/xcuserdata/shinewebsolutions.xcuserdatad/UserInterfaceState.xcuserstate

Thanks

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top