I am running Windows 10 and use Cygwin's git on the Cygwin command line and use Windows git in applications like VS Code, PowerShell etc.
I have a .gitattributes
file with entries like the following:
text eol=crlf
*.ahk text eol=crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.css text
*.java text
*.js text
*.md text eol=crlf
*.sh text eol=lf
*.txt text eol=crlf
*.xml text
However, I am finding that alternating between running git status
on Cygwin or PowerShell repeatedly shows up all files as requiring modifications depending on which one I last checked them all in with.. how do I get the two to agree and obey my .gitattributes
?
In response to the suggestion from @VonC
Tuesday, 2nd of April 2019, 12:32:15 PM
On Cygwin I do this:
$ git config --global core.autocrlf
false
$ echo "* text=auto" >>.gitattributes
$ git add --renormalize .
$ git commit -m "Introduce end-of-line normalization"
... snip
$ git push
... snip
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
And then in PowerShell
> git config --global core.autocrlf
false
> git status
... snip.. every single file listed.. again!