Skip to content

Commit db35e72

Browse files
committed
Add .gitattributes to .gitignore
The file is already being tracked, so this won't affect git operation, but adding .gitattributes here has the effect of it being added to the .npmignore file that npm pack/publish generate. This is desirable because otherwise any dependant project that chooses to commit their node_modules directroy to git is inheriting the developer's environment specific setting in this file. To turn the fun up to 11, the line endings in the published version of this project match the host environment of the publisher and are not convered to the the preferred normalized form configured in the .gitattributes file. So anyone installing and committing on Linux will get a nice screen of errors for all the CRLF files (including the .gitattributes file itself, which was a useful clue) being added to git.
1 parent 6411931 commit db35e72

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.idea/
22
node_modules
33

4+
# already tracked, but should be added to generated .npmignore
5+
.gitattributes
6+
47
#################
58
## Eclipse
69
#################

0 commit comments

Comments
 (0)