I followed cant-ignore-userinterfacestate-xcuserstate and ignore-files-that-have-already-been-committed-to-a-git-repository. But these never works.
My Step Reproduction:
- Quit Xcode
- project directory:
git rm -r --cached .
- project directory:
git add . && git commit -m "remove junk files"
- Open Xcode project
- Then these files appear again.
Most troubled me was that each time I rebase code will automatic appear these files so I will rebase fail of unstage files. Each time I need to stash these file.
This is my .gitignore file code section:
### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
*.xcodeproj/xcuserdata/