Leo Razoumov [off-list ref] writes:
Speaking of .gitignore and untracked files. Explicitly mentioning all
such untracked files in .gitignore is often unpractical. For example,
during build process some large projects autogenerate many temporary
*.c *.h *.cpp files. Hunting all of them down and adding to
.gitignore is a waste of time and one cannot use globs *.c *.h for
obvious reasons.
You can actually, since tracked files are never ignored.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Am 21.05.2010 19:54, schrieb Andreas Schwab:
Leo Razoumov [off-list ref] writes:
quoted
Speaking of .gitignore and untracked files. Explicitly mentioning all
such untracked files in .gitignore is often unpractical. For example,
during build process some large projects autogenerate many temporary
*.c *.h *.cpp files. Hunting all of them down and adding to
.gitignore is a waste of time and one cannot use globs *.c *.h for
obvious reasons.
You can actually, since tracked files are never ignored.
Hm, but that would mean newly added files would never show up again
(the same .gitignore is used by the developers of that submodule when
they do work on it). So I wouldn't add *.c to .gitignore either ...
But I don't consider it a "waste of time" to get the .gitignore
straight for pretty much the same reasons I want to see no warnings
during compilation: So i can instantly see when something fishy
might be going on. I consider that a "best practice" instead.
And for those projects where you can't or don't want to change the
.gitignore: Just ignore when "git status" tells you a submodule has
"untracked content" (it shows that information since 9297f7).