.gitignore does not work for xcuserdata directory in Xcode project

This is my gitignore file:

# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
project.xcworkspace/
xcuserdata/

      

However, it still detects changes here:

BW.xcodeproj/project.xcworkspace/xcuserdata/cooluser.xcuserdatad/UserInterfaceState.xcuserstate

      

This is on XCode 6.

What am I doing wrong?

Thank!

+3


source to share


1 answer


The file BW.xcodeproj/project.xcworkspace/[...]/UserInterfaceState.xcuserstate

should already be tracked by git.

When you add an entry to .gitignore

, it only affects unplayable files. If they are already tracked, they are not automatically removed from the repository.



You can delete this file manually with git rm --cached BW.xcodeproj/project.xcworkspace

+11


source







All Articles