Reputation: 175
I have a file called Authentication.plist in my Xcode project and added it to my .gitignore file. However, I can't stop it from being committed to git automatically when doing so via the xcode source control menu. Is there a more effective way to ensure it doesn't get committed?
Upvotes: 1
Views: 396
Reputation: 13934
Use command git rm --cached Authentication.plist
to untrack the file.
Upvotes: 3
Reputation: 535138
The problem is that Xcode's git
support sucks. It's probably not even seeing that .gitignore file (you didn't say which one it was, global, user level, repo level, etc.). Your best bet is to turn Xcode's git
support off altogether and use SourceTree or the command line. Or, you can at least reduce some of Xcode's automatic behavior:
Notice that I've unchecked "Add and remove files automatically". That will at least help work around this kind of annoying behavior.
Upvotes: 1