Question

I am still pretty new to using git, and I am a little confused on how to ignore files. I know you make a file named .gitignore, and usually have it at the root directory of your project, but is that it?

Am I supposed to add it to my Xcode project in Xcode 5? Most of my research has shown what should be IN the .gitignore (like Gitignore/Objective-C.gitignore), but the closest I've found to my question is: How to add .gitignore file into Xcode project.

While that does say HOW to do it, is this what one does? Or do you just leave it in the base folder and it doesn't matter whether it is in the project or not?

Was it helpful?

Solution

.gitignore files are processed regardless of whether or not they're tracked. They're usually tracked, just as the main branch is usually called master, and since if they're not tracked they're vulnerable to e.g. git clean I can't figure why anyone would leave them untracked, but it's irrelevant. Only what's in them matters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top