Skip to content

Add .gitattributes to .gitignore#22

Merged
michaelkourlas merged 1 commit intomichaelkourlas:masterfrom
strongloop-forks:npmignore-gitattributes
Dec 17, 2014
Merged

Add .gitattributes to .gitignore#22
michaelkourlas merged 1 commit intomichaelkourlas:masterfrom
strongloop-forks:npmignore-gitattributes

Conversation

@rmg
Copy link
Copy Markdown
Contributor

@rmg rmg commented Dec 16, 2014

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.

/cc @sam-github

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.
michaelkourlas added a commit that referenced this pull request Dec 17, 2014
@michaelkourlas michaelkourlas merged commit 2356c61 into michaelkourlas:master Dec 17, 2014
@michaelkourlas
Copy link
Copy Markdown
Owner

Thanks!

@rmg rmg deleted the npmignore-gitattributes branch December 17, 2014 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants