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

Interactive rebase: using "pick" for merge commits

From
SHStefan Haller <lists@haller-berlin.de>
Date
Feb 9, 2024, 15:52 UTC
Message-ID
<424f2e08-a2ad-4bb2-8a6b-136c426dc127@haller-berlin.de>

When I do an interactive rebase, and manually enter a "pick" with the commit hash of a merge commit, I get the following confusing error message:

error: commit fa1afe1 is a merge but no -m option was given. hint: Could not execute the todo command hint: hint: pick fa1afe1 some subject hint: hint: It has been rescheduled; [rest of message snipped]

This error message makes it sound like I could somehow add "-m1" after the "pick" to make it work (which is actually what I would like to be able to do). I had to go read the source code to find out that that's not the case, and the error message only comes from the fact that the code is shared with the cherry-pick and revert commands, which do have the -m option.

Is it crazy to want pick to work like this? Should it be supported?
-Stefan
Next: Phillip Wood
Message 1 of 10 in “Interactive rebase: using "pick" for merge commits”
  1. Stefan HallerFeb 9, 2024
  2. Phillip WoodFeb 9, 2024
  3. Stefan HallerFeb 10, 2024
  4. Patrick SteinhardtFeb 12, 2024
  5. Phillip WoodFeb 12, 2024
  6. Stefan HallerFeb 23, 2024
  7. Phillip WoodFeb 26, 2024
  8. Stefan HallerFeb 26, 2024
  9. phillip.wood123@gmail.comFeb 27, 2024
  10. Junio C HamanoFeb 12, 2024

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.