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

Re: possible gitattributes eol bug with new eol=crlf | lf support?

From
Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>
Date
Sep 12, 2010, 11:46 UTC
Message-ID
<4F27AD7B-2B2D-4378-B1D5-6F380396E0FF@gmail.com>
In-Reply-To
<AANLkTi=xPpPZzUqVEHEkH2sKvSVZH+MzunET6vEA_tw5@mail.gmail.com>
On 10. sep. 2010, at 23.27, Robert Buck wrote:
> I don't understand the inner workings of .git/index, but is removing
> that file destructive to history or anything? What are the
> implications of that delete-command?
Removing the index will lose the changes you've staged ("git add"ed) for the next commit, but your working directory won't be touched.  If you've added a file and then modified or deleted it, you would lose the version of that file that was in the index.
"git reset" then rebuilds the index identically to the HEAD commit, but without the staged changes and (importantly) the stat cache.  The point is to make git re-check every file to see if it has been modified.
Sorry, I should have mentioned the downsides.
- Eyvind
Previous: Robert BuckNext: Robert Buck
Message 4 of 6 in “possible gitattributes eol bug with new eol=crlf | lf support?”
  1. Robert BuckSep 9, 2010
  2. Eyvind BernhardsenSep 10, 2010
  3. Robert BuckSep 10, 2010
  4. Eyvind BernhardsenSep 12, 2010
  5. Robert BuckSep 12, 2010
  6. Eyvind BernhardsenSep 13, 2010

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.