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

reverting a file or files back to repository copy

From
AGAaron Gray <aaronngray.lists@googlemail.com>
Date
May 2, 2009, 14:54 UTC
Message-ID
<137A749092D040488A7F25B4CA5ED1DC@HPLAPTOP>

How do I do the eqivalent of an 'svn revert' on a single file, on a directory of files, or on all files ?

I found 'git reset --hard HEAD' but it seems like a hammer to crack open a nut.

Many thanks in advance,
Aaron
Next: Peter Harris
Message 1 of 3 in “reverting a file or files back to repository copy”
  1. Aaron GrayMay 2, 2009
  2. Peter HarrisMay 2, 2009
  3. Markus HeidelbergMay 2, 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.