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

Re: core.safecrlf warning is confusing[improvement suggestion?]

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 21, 2017, 05:49 UTC
Message-ID
<xmqqk1yki3kj.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CA+A2iZaLZCMvyb3nbcn=ofVGAPeW2_wRhjOeRRu5q01LuV++Gw@mail.gmail.com>
Vladimir Nikishkin <lockywolf@gmail.com> writes:
Show 5 quoted lines
> I want to have LF line endings in the repository and CRLF endings in
> the working copy. (Because I use windows-exclusive tools to develop.)
>
> But for start I have my code with LF endings, because I got it from a
> fellow developer, who develops on UNIX, with LF line endings.

I somehow suspect that perhaps the way you "got it" from the other developer is wrong in the first place. Did you make a zip archive or something and extracted it? That's a wrong way to do a hand-off.

If you "git clone" to have your own copy from the other developer, then your working tree files will follow what your local convention is. Also you do not have to worry about malicious commands left inside .git/config when you made a bit-for-bit copy of the repository and the working tree.

Previous: Junio C HamanoNext: Torsten Bögershausen
Message 3 of 6 in “core.safecrlf warning is confusing[improvement suggestion?]”
  1. Vladimir NikishkinNov 21, 2017
  2. Junio C HamanoNov 21, 2017
  3. Junio C HamanoNov 21, 2017
  4. Torsten BögershausenNov 21, 2017
  5. Junio C HamanoNov 22, 2017
  6. Torsten BögershausenNov 22, 2017

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.