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

Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state

From
Dimitar Bonev <dsbonev@gmail.com>
Date
May 4, 2013, 07:34 UTC
Message-ID
<CADeMBooSZA4D7YctRpRf+axjcUhkMBaJhkd89nssxZYFKph5sA@mail.gmail.com>
Hi,

I have been looking for such a command/option and no one gave me sufficient answer. So this message should be considered as a feature request. I had a situation where I had staged a file with a problem solution in it, then I wanted to experiment with a different solution so I had to revert the file to its HEAD state and I couldn't find a way that preserves the staged state of that file. More discussions:

https://groups.google.com/forum/?fromgroups=#!topic/git-users/nYiN-rE_3i0
http://stackoverflow.com/questions/16335799/git-porcelain-command-to-revert-a-single-file-to-its-head-state-but-keep-its-sta

Regards, Dimitar Bonev

Next: Thomas Rast
Message 1 of 10 in “Add porcelain command to revert a single staged file to its HEAD state while preserving its staged state”
  1. Dimitar BonevMay 4, 2013
  2. Thomas RastMay 4, 2013
  3. Dimitar BonevMay 4, 2013
  4. Jonathan NiederMay 4, 2013
  5. Junio C HamanoMay 4, 2013
  6. Junio C HamanoMay 4, 2013
  7. Dimitar BonevMay 4, 2013
  8. Thomas RastMay 6, 2013
  9. Junio C HamanoMay 6, 2013
  10. Dimitar BonevMay 7, 2013

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.