Re: Line ending normalization doesn't work as expected
- From
Torsten Bögershausen <tboegi@web.de>
- Date
- Oct 3, 2017, 19:19 UTC
- Message-ID
- <88c57b88-ef2c-d7db-15e2-12791d4cb201@web.de>
- In-Reply-To
- <CAHd499AD5Kgbp-vxXTnEPkb-Mb5oEeXhaRO5kGniDdqmXwd2QQ@mail.gmail.com>
On 2017-10-03 19:23, Robert Dailey wrote:
Show 15 quoted lines
> On Tue, Oct 3, 2017 at 11:26 AM, Torsten Bögershausen <tboegi@web.de> wrote: >> The short version is, that the instructions on Github are outdated. >> This is the official procedure (since 2016, Git v2.12 or so) >> But it should work even with older version of Git. >> >> $ echo "* text=auto" >.gitattributes >> $ git read-tree --empty # Clean index, force re-scan of working directory >> $ git add . >> $ git status # Show files that will be normalized >> $ git commit -m "Introduce end-of-line normalization" > > Is the way I did it that worked also a valid solution? Or did it only > work accidentally? Again the command I ran that worked is: > > $ git rm -r --cached . && git add .
(Both should work)
To be honest, from the documentation, I can't figure out the difference between $ git read-tree --empty and $ git rm -r --cached .
Does anybody remember the discussion, why we ended up with read-tree ?