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

git reset --hard include/linux/config.h

From
Sam Ravnborg <sam@ravnborg.org>
Date
Jul 5, 2006, 16:58 UTC
Message-ID
<20060705165801.GA11822@mars.ravnborg.org>

While working on something unrelated I just did a quick hack in include/linux/config.h When done I wanted to get rid of the changes so I did: git reset --hard include/linux/config.h

And the changes made to include/linux/config.h was indeed gone, with all the other changes I had in other files.

Now git reset is maybe supposed to work on commit level only, but it would have been nice if it erroroed out when it saw an argument that it did not know about. In this case I assume git reset used "include/linux/config.h" as <commitish>.

Also what is the right command to bring back a file to the original state after doing some modifications that was not needed anyway?

	Sam
Next: Alex Riesen
Message 1 of 5 in “git reset --hard include/linux/config.h”
  1. Sam RavnborgJul 5, 2006
  2. Alex RiesenJul 5, 2006
  3. Sam RavnborgJul 5, 2006
  4. Alex RiesenJul 5, 2006
  5. Junio C HamanoJul 6, 2006

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.