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

RFC: Renaming "git rebase --onto"

From
Jonathon Mah <me@jonathonmah.com>
Date
Mar 30, 2015, 20:49 UTC
Message-ID
<05D9209E-FAA2-44C8-9B98-B00997AF5779@JonathonMah.com>
During a few years of discussing git operations with colleagues, I’ve found the “git rebase --onto” operation particularly ambiguous. The reason is that I always describe a rebase operation as “onto” something else (because of the English phrase “A is based on B”). For example: 

$ git rebase new-base # “Rebase HEAD onto new-base (from merge-base of HEAD and new-base)" $ git rebase new-base my-branch # “Rebase my-branch onto new-base (from merge-base of my-branch and new-base)”

Personally, I understand “git-rebase --onto new-base old-base” as meaning “rebase from old-base to new-base”. Some prepositions that might make this clearer:

$ git rebase --from old-base new-base # “Rebase HEAD onto new-base, from old-base" $ git rebase --after old-base new-base # “Rebase commits on HEAD after old-base HEAD onto new-base" $ git rebase --excluding old-base new-base # “Rebase HEAD onto new-base, excluding commit old-base (and its parents)"

In all cases this would change the order of the arguments compared to --onto, making it more consistent with the  no-option rebase.
What do others think? Is my view of “onto” common or unusual?

Jonathon Mah me@JonathonMah.com

Next: Jonathan Nieder
Message 1 of 5 in “RFC: Renaming "git rebase --onto"”
  1. Jonathon MahMar 30, 2015
  2. Jonathan NiederMar 30, 2015
  3. Junio C HamanoMar 30, 2015
  4. Michael J GruberApr 2, 2015
  5. Max KirillovMar 30, 2015

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.