xcode – .gitignore for everything inside the xcuserdata folder does not ignore an xcuserstate file

xcode – .gitignore for everything inside the xcuserdata folder does not ignore an xcuserstate file

I found the solution

the problem was not in the .gitignore file

the problem was the UserInterfaceState.xcuserstate that was not removed from git server, found the solution in the following link:

Cant ignore UserInterfaceState.xcuserstate

Additional info

I have also encountered this and seems not to work since .gitignore still adding them after committing. What I have added does the charm for me

….
this cant be read by the .gitignore:

xcuserdata/*

adding this works for me:

*xcworkspace/xcuserdata/*

or to be read:

*/xcuserdata/*

xcode – .gitignore for everything inside the xcuserdata folder does not ignore an xcuserstate file

If you used git, you can add .gitignore

# Xcode
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.moved-aside
DerivedData
.idea/
*.xccheckout
*.moved-aside
xcuserdata/
*.hmap
*.ipa
*.xcworkspace
*.xcuserstate // <--- Here
!default.xcworkspace

Leave a Reply

Your email address will not be published. Required fields are marked *