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

Re: Revert option for git add --patch

From
SRSimon Rozet <simon@rozet.name>
Date
Nov 8, 2012, 01:00 UTC
Message-ID
<CAHAYOozgUaV=GH8zOaJn1xLSM_M-aKmFovcOEVzYpNTBW6ifgQ@mail.gmail.com>
In-Reply-To
<CAPXHQbN0x-o_4rQO-Lq_gDTqs=beBE5XrrzJ1Th+7G2Lq7Dh_Q@mail.gmail.com>
help
On Wed, Nov 7, 2012 at 3:54 PM, Nathan Broadbent <nathan.f77@gmail.com> wrote:
Show 25 quoted lines
> Hi,
>
> I would like to propose a revert option for 'git add --patch', that
> reverts the hunk. I often use `git add -p` to skip whitespace changes
> when preparing a patch, and a 'revert' option would save me from
> running 'git checkout <file>' after I've staged the desired changes.
>
> I would propose adding r and R options for the 'Stage this hunk' menu,
> with the following actions:
>
> r: Revert this hunk
> R: Revert this hunk and all other remaining hunks
>
> e.g. Stage this hunk [y/n/a/d/K/j/J/e/r/R?]?
>
>
> Please let me know if you think this is a good idea.
>
>
> Best,
> Nathan
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Nathan BroadbentNext: Michal Kiedrowicz
Message 2 of 3 in “Revert option for git add --patch”
  1. Nathan BroadbentNov 7, 2012
  2. Simon RozetNov 8, 2012
  3. Michal KiedrowiczNov 8, 2012

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.