gitgitignore

Should you commit .gitignore into the Git repos?


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?


Solution

  • 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.