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

Re: Revert a single commit in a single file

From
Thomas Ferris Nicolaisen <tfnico@gmail.com>
Date
Feb 25, 2011, 14:38 UTC
Message-ID
<AANLkTikb_mWdgF4gf6FEBF=CLxLeefJJkRgDzEB5=3SO@mail.gmail.com>
In-Reply-To
<4D67A92D.2000300@drmicha.warpmail.net>
Ævar, Michael, thanks for the tips.
Dario: Yes, I understand the reasoning. It's not often a problem, and
when it occurs there are ways to do it. I just thought I'd bring it up
on the list cause it feels like expected behavior (other git commands
behave correspondingly).

On Fri, Feb 25, 2011 at 2:05 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 5 quoted lines
> Note that you can also
>
> git show <commit> -- <path> | git apply -R
>
> to achieve a partial revert. That might be the easiest route to take.
Indeed it is. Neat command, thanks again!
Previous: Michael J GruberNext: Dario Rodriguez
Message 6 of 13 in “Revert a single commit in a single file”
  1. Thomas Ferris NicolaisenFeb 25, 2011
  2. Ævar Arnfjörð BjarmasonFeb 25, 2011
  3. Michael J GruberFeb 25, 2011
  4. Dario RodriguezFeb 25, 2011
  5. Michael J GruberFeb 25, 2011
  6. Thomas Ferris NicolaisenFeb 25, 2011
  7. Dario RodriguezFeb 25, 2011
  8. Junio C HamanoFeb 25, 2011
  9. Ævar Arnfjörð BjarmasonFeb 25, 2011
  10. Junio C HamanoFeb 25, 2011
  11. Ævar Arnfjörð BjarmasonFeb 25, 2011
  12. Jay SoffianFeb 25, 2011
  13. Dario RodriguezFeb 26, 2011

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.