.gitignore not working 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:
- Archiving error: no matching architecture
- Unable to install enterprise app - This provisioning profile cannot be installed on this device
- Could not create a bot on Server 4.0.3
- Xcode. Scheme is missing on one branch
- Xcode stuck on “Loading Revision” and “Scanning for working copies…” when using Source Control
- How to change code of static library .a file Xcode Project for another Xcode project?
This is on XCode 6.
What am I doing wrong?
One Solution collect form web for “.gitignore not working for xcuserdata directory in XCode project”
BW.xcodeproj/project.xcworkspace/[...]/UserInterfaceState.xcuserstate must already be tracked by git.
When you add an entry to
.gitignore it only affects untracked files. If they are already tracked, they are not automatically removed from the repository.
You can remove this file manually with:
git rm --cached BW.xcodeproj/project.xcworkspace