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

Git reset -p on working tree

From
Jeenu V <jeenuv@gmail.com>
Date
Nov 23, 2010, 09:11 UTC
Message-ID
<AANLkTimc=Dt9YSu=J=7C-f1hZ9UODU7VHu6oD8dmFX3N@mail.gmail.com>

Often I find it useful to selectively undo the modifications that I did to my working tree. The -p option to 'reset' that selectively resets changes back to a given commit. Unfortunately the option reports itself to be incompatible with --{hard,soft,mixed} and thus can't be applied to working tree.

Right now I do this with vimdiff, by applying 'git diff' in reverse. Wish reset supports -p on working tree operations as well because the -p framework (of add, and reset) feels good to use.

-- 
Jeenu
Next: knittl
Message 1 of 14 in “Git reset -p on working tree”
  1. Jeenu VNov 23, 2010
  2. knittlNov 23, 2010
  3. Jeenu VNov 23, 2010
  4. Jeenu VNov 23, 2010
  5. knittlNov 23, 2010
  6. Jeenu VNov 23, 2010
  7. Hint at "checkout -p" in the "reset --patch <type>" error messageŠtěpán Němec, Nov 23, 2010
  8. Jeff KingNov 23, 2010
  9. Štěpán NěmecNov 23, 2010
  10. Michael J GruberNov 25, 2010
  11. Jakub NarebskiNov 25, 2010
  12. Michael J GruberNov 25, 2010
  13. Matthieu MoyNov 25, 2010
  14. Jeff KingNov 25, 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.