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

Reverting a range of commits with conflict

From
SLSam Lee <skynare@gmail.com>
Date
Apr 1, 2019, 17:25 UTC
Message-ID
<CACrt3pyZ7XNHLfFM46qymLYft4+jXSU_HBD2Wk+cL6MSzryFhA@mail.gmail.com>
Given:
    A-B-C-D-E (HEAD)
I want to create a single commit that reverts A-B-C
So, I execute:
    git revert --no-commit A~..C
which causes conflict (while reverting C, it seems).
I resolve conflicts and I continue:
    git revert --continue --no-commit
And, it complains:
    fatal: revert: --no-commit cannot be used with --continue
If I revert --continue without --no-commit:
    git revert --continue

It brings up EDITOR twice and I end up with two commits. I can squash them. But, I don't know if this is a desired behavior.

Should I be able to revert --continue with --no-commit? Should revert --continue remember that initial revert invocation was with --no-commit option?

Thanks.
Next: Junio C Hamano
Message 1 of 2 in “Reverting a range of commits with conflict”
  1. Sam LeeApr 1, 2019
  2. Junio C HamanoApr 2, 2019

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.