/* in .gitignore

From: Hilco Wijbenga <hidden>
Date: 2016-06-15 22:54:52

Hi all,

If you add "/*" (or "*") to '.gitignore' Git will ignore '.gitignore'.
This means that your '.gitignore' appears to work (which in fact it
does) but really it will only work for you because your '.gitignore'
will not be added to the repository. You have to override with an
explicit "!/.gitignore" for it to work correctly. (Or use "git add -f
.gitignore".)

Naturally, this behaviour makes perfect sense: "/*" means everything.
Still, I was wondering whether it might be a good idea to make an
exception for '.gitignore' itself? Then if somebody *really* wanted to
ignore '.gitignore' they could add "/.gitignore" to '.gitignore'?

Cheers,
Hilco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help