Should you commit .gitignore into the Git repos?

Howard picture Howard · Apr 23, 2011 · Viewed 161.3k times · Source

Do you think it is a good practice to commit .gitignore into a Git repo?

Some people don't like it, but I think it is good as you can track the file's history. Isn't it?

Answer

Bruce Stephens picture Bruce Stephens · Apr 23, 2011

Normally yes, .gitignore is useful for everyone who wants to work with the repository. On occasion you'll want to ignore more private things (maybe you often create LOG or something. In those cases you probably don't want to force that on anyone else.