Reputation: 5665
It seems that when you create a file with XCode for a project under git version control, it will always do a git add
for the new file.
If you then commit, then the new file's in your repo's history for good.
I want to add this file to the XCode project, but not have it be tracked by git. So what I do now:
git rm --cached
on the file which XCode added to gitI'd be happy to settle for a way to get XCode to optionally skip the git add
for the new file so that I can skip git rm --cached
. Also adding it to the .gitignore would be icing. Anyone know a way?
Upvotes: 1
Views: 568
Reputation: 43314
I want to add this file to the XCode project, but not have it be tracked by git.
To achieve this, you must uncheck the Add and remove files automatically
under Xcode -> Preferences -> Source Control
I'd be happy to settle for a way to get XCode to optionally skip the git add
I'm afraid it's not possible to have it add and remove files optionally. It either yes for all files, or no for all files.
Upvotes: 2