Reputation: 33501
I am new to Git, and this is my first project using Git rather than SVN as my source control. I am working in XCode on an iPhone project. I want Git to ignore the build directory, which is in the root folder of the XCode project. I've found several other questions here and also found articles on google that provide examples on how to create the .gitignore file in the root directory and then add it to the Git repository to get the directory to be ignored.
Here are the steps I'm taking when setting up the repository:
git init
to initialize the repositorygit add .gitignore
to add the gitignore filegit commit -m
to commit the gitignore filegit status
to view the status of the repositoryAt this point, all of the other directories and files listed in my gitignore file are properly ignored except the build directory. Here is what my gitignore file looks like:
build/
.DS_Store
**/*.pbxuser
*.mode2v3
*.mode1v3
**/*.perspectivev*
I have tried ignoring the build directory using the following different entries with no success:
Anyone know what I'm doing wrong here?
Upvotes: 5
Views: 3673
Reputation: 1329692
build/
or build/*
should be enough to ignore the directory.
See also "Difference between .gitignore
rules with and without trailing slash like /dir
and /dir/
"
The only reasons it could be still not ignored at this point if it:
/build
) in the .gitignore
file rule, as in this .gitconfig
, before Git 2.0 (Q2 2014).Upvotes: 5