Enforce Unix line endings (LF).
This should convert all files checked into the repository to LF line endings, with exception of pictures and PDFs. Trying to commit CRLF text on Unix will issue a warning when doing "git add" or "git commit -a". Users prefering CRLF (Windows) can set their local copy of the repository to convert files on the fly at checkout with git config --local core.autocrlf = true Note: Git acts pretty stubborn on files which don't match the .gitattributes rules, but are already committed. This can happen after every change to .gitattributes. Git doesn't want to keep these files as-is in the repository and insists on conversion as soon as they're touched somehow. The only way to deal with this is to either edit .gitattributes again (in case these enforced conversions don't match the intention) or to commit the enforced changes immediately. To put a bit more oil into the fire, Git doesn't recognize all misalignments immediately, but trusts its cache. Accordingly it's a good idea to clear this cache after any change to .gitattributes: rm .git/index Having this done, all further proceedings will show all misaligments immerdiately. For further instructions and descriptions see http://schacon.github.io/git/gitattributes.html http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/ http://git.661346.n2.nabble.com/possible-gitattributes-eol-bug-with-new-eol-crlf-lf-support-td5516458.html https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings
This commit is contained in:
parent
4c34674b6e
commit
86f1fc418f
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
* text
|
||||
|
||||
*.gcode -text
|
||||
|
||||
*.gz -text
|
||||
*.zip -text
|
||||
|
||||
*.png -text
|
||||
*.jpg -text
|
||||
*.jpeg -text
|
||||
*.pdf -text
|
||||
|
||||
Loading…
Reference in New Issue