1

Trying to pull latest I received following message:

Igors-MacBook-Air:dbhandler igorkorot$ git pull
warning: redirecting to https://github.com/oneeyeman1/dbhandler.git/
warning: Cannot merge binary files: dbhandler.xcodeproj/project.xcworkspace/xcuserdata/igorkorot.xcuserdatad/UserInterfaceState.xcuserstate (HEAD vs. 99e3237b1e5ece37e624a4ca1c78d739c97e79df)
Auto-merging dbhandler.xcodeproj/project.xcworkspace/xcuserdata/igorkorot.xcuserdatad/UserInterfaceState.xcuserstate
CONFLICT (content): Merge conflict in dbhandler.xcodeproj/project.xcworkspace/xcuserdata/igorkorot.xcuserdatad/UserInterfaceState.xcuserstate
Automatic merge failed; fix conflicts and then commit the result.

Is this file needs to be in VC? My initial thought was to put everything in VC but turns out Xcode project files contains binary files as well. And I'm not well versed with Xcode internals.

Igor
  • 4,364
  • 8
  • 38
  • 80

1 Answers1

1

Check if adding binary merge to a xcuserstate file would help:

echo '*.xcuserstate  binary merge' >> .gitattributes
  • binary would keep the implied -text (remove crlf) and -diff (no diff),
  • but merge would allow the file to be merged.

See "using macro attributes" for the documentation, and "gitattributes and the binary option" for a practical example.

However, more generally, such files do not need to be in source control (as stated here).
You can see here what they represent.
You can remove them and ignore them (preferably git rm with the --cached option).

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • I will try that but the bigger question is whether the file shuold be under the VC or not. – Igor Nov 16 '18 at 18:01
  • @Igor Right! I missed that part of your question. I have updated my answer accordingly. – VonC Nov 16 '18 at 19:31
  • I exclude those files and eve3rything seems to be still working. Thank you. – Igor Nov 20 '18 at 15:56