I have created a gitignore file but xCode is not using it so I get merge source code errors, what have I done wrong ?

I have been compiling my App for a couple of years now no problem and it has been using my gitignore quite happily.


All of a sudden something has gone wrong and now, when I try to merge a branch back to master I get an error related to xcuserdata, which it should be ignoring.


I therefore assume that xCode is no longer fidning my gitignore file.


My gitignore file is called default.gitignore.


Where in xCode do I define where to look for my gitignore file ? I have forgotten and can't seem to find a reference telling me where to find it.


Any guidance much appreciated.


Thanks,

Guy

Your gitignore file must have the following name:


.gitignore


You can't call it default.gitignore and have git recognize it as a gitignore file.


You don't tell Xcode where to look for your .gitignore file. You place the .gitignore file in your git repository, normally at the root of the repository, inside the .git folder.


Keep in mind the Finder hides files and folders that begin with a period so you may have a difficult time finding your .gitignore file and your git repository in the Finder. I normally use BBEdit to write and save .gitignore files because it can show hidden files and directories in the Open and Save dialogs. I don't know if TextWrangler has the same capability. There are also utilities and Terminal commands to temporarily show hidden files and directories. An Internet search for os x show hidden files reveals many articles showing the Terminal commands to use.

I have created a gitignore file but xCode is not using it so I get merge source code errors, what have I done wrong ?
 
 
Q