Since a combined upgrade to macOS 26.4 and Xcode 26.4 I am plagued by .DS_Store and UserInterfaceState files appearing in my repository list of uncommitted changes. This is preventing commits and merging etc.
I have added the following list to both the .gitignore_global file via directly editing the file and also the Xcode>Settings>Git Settings>Ignore Files
# Mac OS X
.DS_Store
# Xcode
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcuserstate
UserInterfaceState.xcuserstate
project.xcworkspace/
xcuserdata/
# Generated files
*.o
*.pyc
# Build directories
DerivedData/
build/
# CocoaPods
Pods/
# Carthage
Carthage/
# Other
*.swp
*.lock
This has been to no avail.
I have raised Feedback FB22370688 for this issue. It has been marked as no similar reports which is odd because there are a lot of mentions of the .DS_Store files appearing in Git and also of problems with the ignore settings of Git.
For a while, I successfully prevented the .DS_Store files from showing up as uncommitted changes but now they are back again.
I did a git status on the project and got this output for a while
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: Target Analysis.xcodeproj/project.xcworkspace/xcuserdata/myuserid.xcuserdatad/UserInterfaceState.xcuserstate
Ignored files:
(use "git add -f <file>..." to include in what will be committed)
Target Analysis iOS/
Target Analysis macOS/
Views/Testing/.DS_Store
Now, in Xcode it looks like this
So the .DS_Store files are no longer being ignored.
I have raised an Apple Developer Tech Support (DTS) Question as I have exhausted every avenue that I could find.
DTS said to just remove the file(s) in Git. Neither this nor the .gitignore_global file are fixing the problem.
This all just seems to be so unnecessarily difficult especially as many others have faced the same problem.