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

Re: git has modified files after clean checkout

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 1, 2009, 19:48 UTC
Message-ID
<200901012048.13630.trast@student.ethz.ch>
In-Reply-To
<81bfc67a0901010048l7a4a8fa1h42f7cd448dfc704@mail.gmail.com>
Caleb Cushing wrote:
> >  The files you mention contain CRLF.  Do you have core.autocrlf set
> >  globally somewhere, perhaps in your ~/.gitconfig?
> 
> yes I have it set to input

Do you have any .gitattributes? A few days ago, ludde on IRC bumped into the problem that git-checkout applies the .gitattributes that are present in the tree *before* the checkout. Naturally this means that the .gitattributes do not apply at all during the first checkout at the end of cloning. In ludde's case, this caused git-blame to think the file had all line endings changed compared to the index version.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Caleb CushingNext: Caleb Cushing
Message 4 of 6 in “git has modified files after clean checkout”
  1. Caleb CushingDec 31, 2008
  2. David AguilarDec 31, 2008
  3. Caleb CushingJan 1, 2009
  4. Thomas RastJan 1, 2009
  5. Caleb CushingJan 2, 2009
  6. Caleb CushingJan 5, 2009

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.