Alex Rivera | Logout

Should you commit .gitignore into the Git repos?

Asked 2011-04-23T17:08:02.490
661

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?

Edit
Report

2 Answers

635

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.

answered 2011-04-23T17:11:58.823
-10

It is a good practice to .gitignore at least your build products (programs, *.o, etc.).

answered 2011-04-23T18:31:46.320

Your Answer