core.autocrlf

Git files modified after checkout, reset --hard, etc. even though autocrlf is set to false

眉间皱痕 提交于 2019-12-18 12:16:54
问题 Here is my system dialogue: unrollme-dev-dan:views Dan$ git reset --hard HEAD HEAD is now at 3f225e9 Fix scan titles unrollme-dev-dan:views Dan$ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: app/signup/finish.html # modified: app/signup/scan.html # I have autocrlf set to false: unrollme-dev-dan:unroll-website Dan$ git config

git status shows modifications even with autocrlf=false

让人想犯罪 __ 提交于 2019-12-17 07:17:16
问题 I'm experiencing the same issues as in this question: git status shows modifications, git checkout -- <file> doesn't remove them Git continues to show working directory modifications, even with git config --global core.autocrlf false : E:\_dev\github\Core [master +0 ~93 -0]> git config --get-all core.autocrlf false false (Note that I've even set the --system setting to be false ) Why does it appear that Git is still modifying my end of lines? Attempts to get rid of modifications Baseline E:\

`git` shows changed files after cloning, without any other actions

守給你的承諾、 提交于 2019-12-10 10:58:06
问题 git clone git@github.com:erocarrera/pydot (35a8d858b) in a Debian with git config core.autocrlf input shows: modified: test/graphs/b545.dot modified: test/graphs/b993.dot modified: test/graphs/cairo.dot These files have CRLF line endings, for example: $ file test/graphs/cairo.dot test/graphs/cairo.dot: UTF-8 Unicode text, with CRLF line terminators The .gitattributes file contains: *.py eol=lf *.dot eol=lf *.txt eol=lf *.md eol=lf *.yml eol=lf *.png binary *.ps binary Changing core.autocrlf

What is the differrence between `* text=auto` and `* text eol=lf` in .gitattributes?

家住魔仙堡 提交于 2019-12-09 13:31:20
问题 I am looking again and again at the documentation of .gitattributes but I cannot find a clear answer on what is the differrence between these two: * text=auto * text eol=lf Also is text=auto intended only for use with * or it can also be used with specific extensions? In such a case what is the differrence? *.txt text=auto *.txt text eol=lf 回答1: TL;DR The eol=lf setting overrides any text setting, and since you have chosen to apply this to every path, only the eol=lf setting will matter, if

Enforce core.autocrlf=input through .gitattributes

孤街醉人 提交于 2019-12-09 11:20:27
问题 Is there a way to enforce core.autocrlf=input from within the .gitattributes in order to propagate the policy throughout my colleagues? In detail what I want is to convert to lf on add and leave as is on checkout . The problem is that neither text nor eol do what I want in .gitattributes since eol has 3 acceptable values: lf crlf native Ideally I would like my .gitattributes file to look like this: * text eol=asis 回答1: In detail what I want is to convert to lf on commit and leave as is on

Does GIT does the CRLF/LF conversion during commit or checkout(vi)?

前提是你 提交于 2019-12-08 03:08:20
问题 I have a doubt now, does Git does the CRLF conversion during a commit or during a vi of the file? Let’s say I have some files in Windows with CRLF (not a Git repo), when I sync these files to a UNIX Git repo and do git add/commit with autocrlf true enabled, will these files get the conversion from CRLF to LF? Or does it do the conversion of these files only when I vi these files and commit it again? The second doubt is, what should be the autocrlf and safecrlf setting in both Unix and Windows

Override .gitattributes text=auto in Windows

橙三吉。 提交于 2019-12-07 08:19:08
问题 This is pretty unintuitive: C:\python-tdl\examples\termbox>git config core.autocrlf false C:\python-tdl\examples\termbox>git commit termbox.py warning: LF will be replaced by CRLF in examples/termbox/termbox.py. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in examples/termbox/termbox.py. The file will have its original line endings in your working directory. warning: LF will be replaced by CRLF in examples/termbox/termbox.py. The

GIT: How to get rid of the annoying CRLF message on msysgit (windows)?

旧街凉风 提交于 2019-12-07 04:27:35
问题 Practically everytime I stage a textfile (that's most of em), I get the message from git gui (I use msysgit) that It replaced (or is about to) line endings with CRLF's. Obviously I want that (and there's a setting for it huraah), but I don't want the annoying message popped up all the time! Any way to keep the setting, but turn off/disable the popup message? I have no idea how this works with GIT on the commandline, but I like msysgit's staging process :) so I'd rather not change to bash. 回答1

Does GIT does the CRLF/LF conversion during commit or checkout(vi)?

。_饼干妹妹 提交于 2019-12-06 13:41:17
I have a doubt now, does Git does the CRLF conversion during a commit or during a vi of the file? Let’s say I have some files in Windows with CRLF (not a Git repo), when I sync these files to a UNIX Git repo and do git add/commit with autocrlf true enabled, will these files get the conversion from CRLF to LF? Or does it do the conversion of these files only when I vi these files and commit it again? The second doubt is, what should be the autocrlf and safecrlf setting in both Unix and Windows Git clones if my parent repository exists in Unix and need LF alone. Should I use global setting?

What does “check out code” mean in git documentation for line endings?

谁都会走 提交于 2019-12-06 07:27:03
I'm really confused what "check out code" means in the following page: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#__code_core_autocrlf_code If you’re on a Windows machine, set it to true – this converts LF endings into CRLF when you check out code: Does it mean when you add files? Because whenever I change core.autocrlf from input to true and vice-versa, the differrence I see in when I add the files (does "check out" mean "add"?): > git config --global core.autocrlf true > git add crlf-file.md > git add lf-file.md warning: LF will be replaced by CRLF in lf-file.md. The