I want git to ignore my UserInterfaceState.xcuserstate file in my XCode4 project, but where should I put the .gitignore file?, is it inside the .git folder? or out? The .git is in same folder with the ProjectName.xcodeproj file
I want git to ignore my UserInterfaceState.xcuserstate file in my XCode4 project, but where
Share
You can have a
.gitignorein every single directory of your project.However, the best practice is to have one single
.gitignorefile on the project root directory, and place all files that you want to ignore in it, like this:Once you create the
.gitignorefile, the ignore files that have changes or are new into the repository will not be shown to as waiting for commit.You can also have one global local git ignore file, that will manage all of your git repositories.
git config --global core.excludesfile ~/.gitignore_globalThis alternative is particularly interesting for ignored files that are non-project related, such as IDE related files and so on.