git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: turn off "LF will be replaced by CRLF" thingy

From
Ddavid@lang.hm <david@lang.hm>
Date
Dec 29, 2008, 17:29 UTC
Message-ID
<alpine.DEB.1.10.0812290928370.15026@asgard.lang.hm>
In-Reply-To
<gjat90$5la$4@ger.gmane.org>
On Mon, 29 Dec 2008, Zorba wrote:
Show 9 quoted lines
> Thanks Dmitry,
>
> So I have two options to do this - edit the files direct or issue a command,
> thank you !
>
> Now, my next problem is taking all my changes ($ git add .  -> puts 5k files
> into index, with LF in place of CRLF) out of the index.
>
> Because I haven't committed anything in this repo yet...

I think if you just do a git add . again it will put the files into the index without doing the conversion.

David Lang
Show 39 quoted lines
> $ git reset --hard
>
> ....falls over, as it has no HEAD to reset to
>
> I think I read how to do this in a tutorial somewhere, maybe with
> git-checkout, but I'm searching and can't find it.
> Any kind soul can point me in the right direction ?
>
> thanks !
> "Dmitry Potapov" <dpotapov@gmail.com> wrote in message
> news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...
>>> I'd rather not let git change any files, many of which are PHP that run
>>> on
>>> Apache
>>> I think I remember reading that this is a config option that gets
>>> swithced
>>> on by default on windows (which we are running git on)
>>>
>>> how do I switch it off ?
>>
>> git config core.autocrlf false
>>
>> or if you want to ensure that all your text files have only LF then
>>
>> git config core.autocrlf input
>>
>> or if you want to disable conversion for some specific files then you can
>> use 'crlf' attribute. See 'gitattributes' for more information.
>> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
>>
>> Dmitry
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
Previous: ZorbaNext: Zorba
Message 5 of 7 in “turn off "LF will be replaced by CRLF" thingy”
  1. ZorbaDec 29, 2008
  2. ZorbaDec 29, 2008
  3. Dmitry PotapovDec 29, 2008
  4. ZorbaDec 29, 2008
  5. david@lang.hmDec 29, 2008
  6. ZorbaDec 30, 2008
  7. Boyd Stephen Smith Jr.Dec 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.