I am a new user to git and I am starting a new project. I have a bunch of dot files that I would like to ignore. Is there an ignore command for git like there is for svn?
I am a new user to git and I am starting a new project.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no special
git ignorecommand.Edit a
.gitignorefile located in the appropriate place within the working copy. You should then add this.gitignoreand commit it. Everyone who clones that repo will than have those files ignored.Note that only file names starting with
/will be relative to the directory.gitignoreresides in. Everything else will match files in whatever subdirectory.You can also edit
.git/info/excludeto ignore specific files just in that one working copy. The.git/info/excludefile will not be committed, and will thus only apply locally in this one working copy.You can also set up a global file with patterns to ignore with
git config --global core.excludesfile. This will locally apply to all git working copies on the same user’s account.Run
git help gitignoreand read the text for the details.