I’m trying to add some patterns to my .gitignore file to ignore *.mode1v3 and *.pbxuser files generated by Xcode. However, my app name has a space in it, so the files I want to ignore are in the Foo Bar.xcodeproj/ directory. Adding variants of these patterns don’t seem to work:
*.mode1v3
Foo Bar.xcodeproj/
Foo Bar.xcodeproj/*.mode1v3
Foo Bar.xcodeproj/username.mode1v3
What should the .gitignore patterns be?
AFAIK spaces aren’t treated specially; neither Pro Git nor
gitignore(5)norfnmatch(3)mentions them. Anyway the first pattern*.mode1v3is totally sufficient; patterns without slashes are applied to all subdirectories. If you want additional ignore patters for a specific subdirectory, just place a dedicated.gitignorein that directory.