Closed jmcc0nn3ll closed 4 months ago
I still would prefer all paths to be rooted. That ensures that the exclusions only match in expected places and not any depth. A rooted path is one that begins with /
. The /
references the root of the git repository (not an absolute path on the filesystem).
If there is a separator at the beginning of the pattern, then the pattern is relative to the directory level of the particular .gitignore file itself.
The following entry is a good case of when you want an unrooted path:
.DS_Store/
(note the trailing slash, though)
That's because this folder can (and likely will) occur anywhere.
Do we have a sane .gitattributes
too?
(and no, all of the auto eol tricks that git does are broken, and have remained broken for years)
Here's what I tend to use for .gitattributes (with more diff settings if they apply for the project)
* text=auto eol=lf
*.css diff=css
as per title