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

[RFC] should `git rebase --keep-base` imply `--reapply-cherry-picks` ?

From
Philippe Blain <levraiphilippeblain@gmail.com>
Date
Jul 14, 2020, 02:44 UTC
Message-ID
<0EA8C067-5805-40A7-857A-55C2633B8570@gmail.com>
Hello,

I learned today that doing `git rebase --keep-base master` will drop commits that were cherry-picked from master to the current branch. I was simply doing a code clean up on my feature branch (the full command was `git rebase -i --keep-base master`), and this kind of confused me for a moment.

Is this a sane default ? I understand that it is a good default when we are rebasing *on top* of master, but here I'm just doing some squashing and fixup's and I did not want the commit I had cherry-picked from master to disappear (yet). In fact, because it was dropped, it created a modify/delete conflict because in a subsequent commit in my feature branch I'm modifying files that are added in the commit I cherry-picked.

How would a change that made '--reapply-cherry-picks' be the default when using 'keep-base' be received ?

Tangential question: in any case, would it make sense to still add the "dropped because already upstream" commits to the todo list, in the case of an interactive rebase ? (maybe commented out, or listed as 'drop' with some kind of comment saying those are dropped because they appear textually upstream?)

Cheers, Philippe. P.S. I CC'd those who were involved with the 'keep-base' patch or the 'reapply-cherry-picks' patch.

Next: Denton Liu
Message 1 of 8 in “[RFC] should `git rebase --keep-base` imply `--reapply-cherry-picks` ?”
  1. Philippe BlainJul 14, 2020
  2. Denton LiuJul 14, 2020
  3. Jonathan TanJul 14, 2020
  4. Denton LiuJul 15, 2020
  5. Phillip WoodJul 14, 2020
  6. Johannes SchindelinJul 14, 2020
  7. Denton LiuJul 15, 2020
  8. Phillip WoodJul 15, 2020

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.