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

Re: [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Aug 13, 2025, 13:31 UTC
Message-ID
<52504ef0-7d4c-4298-af11-10477673e9d0@gmail.com>
In-Reply-To
<pull.1949.v6.git.1754949075.gitgitgadget@gmail.com>
Hi Julia
On 11/08/2025 22:51, Julia Evans via GitGitGadget wrote:
>   * move "You can also use git rebase to reorder or combine commits:" to the
>     beginning
Great
Show 14 quoted lines
>   * replace "detailed description" with "simplified description" -- I thought
>     that I could write something that was relatively readable and also
>     accurate, but as usual Git has proven me wrong :). I tried to leave in
>     the details that I think seem relevant to using git: for example git
>     checkout --detach is relevant because it explains why git reflog works
>     well after a rebase.
>   * replace the git switch with git checkout that I'd missed previously
> 
> I didn't use the git log --cherry-pick option in the explanation because I
> had personally never heard of that option before today, and I don't want
> people to have to read the git log man page to be able to understand the
> explanation. I also left out --reapply-cherry-picks just because I don't
> understand the use case so I couldn't evaluate how likely it is to be
> relevant to the person reading.

The use case for --reapply-cherry-picks is mostly that it is faster to try picking a commit and then drop it if it results in a empty change than it is to do the patch-id comparisons to avoid picking the commit in the first place. This is especially true on partial clones where the cherry-pick detection is really slow. I'm happy to leave it out but I wonder if we should drop the references to --fork-point and --root as well given they're also both pretty niche. I'd also be very happy to go with Junio's suggestion to replace steps 1 & 2 with a general description that does not mention 'git log' at all.

Thanks
Phillip
Show 86 quoted lines
> 
> Julia Evans (5):
>    doc: git-rebase: start with an example
>    doc: git rebase: dedup merge conflict discussion
>    doc: git rebase: clarify arguments syntax
>    doc: git-rebase: move --onto explanation down
>    doc: git-rebase: update discussion of internals
> 
>   Documentation/git-rebase.adoc | 302 +++++++++++++++-------------------
>   1 file changed, 136 insertions(+), 166 deletions(-)
> 
> 
> base-commit: 2c2ba49d55ff26c1082b8137b1ec5eeccb4337d1
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1949%2Fjvns%2Fclarify-rebase-v6
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1949/jvns/clarify-rebase-v6
> Pull-Request: https://github.com/gitgitgadget/git/pull/1949
> 
> Range-diff vs v5:
> 
>   1:  c2f2e05078f ! 1:  e7a8fbbe53c doc: git-rebase: start with an example
>       @@ Documentation/git-rebase.adoc: SYNOPSIS
>         DESCRIPTION
>         -----------
>        +Transplant a series of commits onto a different starting point.
>       ++You can also use `git rebase` to reorder or combine commits: see INTERACTIVE
>       ++MODE below for how to do that.
>        +
>        +For example, imagine that you have been working on the `topic` branch in this
>        +history, and you want to "catch up" to the work done on the `master` branch.
>       @@ Documentation/git-rebase.adoc: SYNOPSIS
>        +    D---E---F---G master
>        +------------
>        +
>       -+You can also use `git rebase` to reorder or combine commits: see INTERACTIVE
>       -+MODE below for how to do that.
>        +
>         If `<branch>` is specified, `git rebase` will perform an automatic
>         `git switch <branch>` before doing anything else.  Otherwise
>   2:  5459b7ff560 ! 2:  ad63f69918d doc: git rebase: dedup merge conflict discussion
>       @@ Commit message
>        
>         ## Documentation/git-rebase.adoc ##
>        @@ Documentation/git-rebase.adoc: shortcut for `git checkout topic && git rebase master`.
>       - You can also use `git rebase` to reorder or combine commits: see INTERACTIVE
>       - MODE below for how to do that.
>       + ------------
>       +
>         
>        +If there is a merge conflict during this process, `git rebase` will stop at the
>        +first problematic commit and leave conflict markers. If this happens, you can do
>   3:  948c205f1e6 = 3:  7ee6b0afe88 doc: git rebase: clarify arguments syntax
>   4:  e229b9fccb2 = 4:  4686417b28e doc: git-rebase: move --onto explanation down
>   5:  5ab235b067b ! 5:  9c7f2716bc8 doc: git-rebase: update discussion of internals
>       @@ Documentation/git-rebase.adoc: linkgit:git-config[1] for details) and the `--for
>        -`--onto` option was supplied.  This has the exact same effect as
>        -`git reset --hard <upstream>` (or `<newbase>`). `ORIG_HEAD` is set
>        -to point at the tip of the branch before the reset.
>       -+Here is a more detailed description of what `git rebase <upstream>` does:
>       ++Here is a simplified description of what `git rebase <upstream>` does:
>        +
>       -+1. Make a list of all commits in the current branch that are not in
>       -+   `<upstream>`. This is the same set of commits that would be shown by `git log
>       -+   <upstream>..HEAD`. You can use `--fork-point` or `--root` to change how this
>       -+   list of commits is constructed.
>       ++1. Make a list of all new commits on your current branch since it branched
>       ++   off from `<upstream>`. This is the same set of commits that would be shown
>       ++   by `git log  <upstream>..HEAD`. You can use `--fork-point` or  `--root` to
>       ++   change how this list of commits is constructed.
>        +2. Check whether any of those commits are duplicates of commits already
>       -+   in `<upstream>`, remove them from the list, and print out a warning about
>       -+   each removed commit. You can use `--reapply-cherry-picks` to include
>       -+   duplicate commits.
>       -+3. Check out `<upstream>` (or `<newbase>` if the `--onto` option was
>       -+   supplied) with the equivalent of `git checkout --detach <upstream>`.
>       ++   in `<upstream>` and remove them from the list.
>       ++3. Check out `<upstream>` with the equivalent of `git checkout --detach <upstream>`.
>        +4. Replay the commits, one by one, in order. This is similar to running
>        +   `git cherry-pick <commit>` for each commit. See REBASING MERGES for how merges
>        +   are handled.
>        +5. Update your branch to point to the final commit with the equivalent
>       -+   of `git switch -C <branch>`.
>       ++   of `git checkout -C <branch>`.
>         
>         [NOTE]
>        -`ORIG_HEAD` is not guaranteed to still point to the previous branch tip
> 
Previous: Julia Evans via GitGitGadgetNext: Julia Evans
Message 95 of 103 in “doc: git-rebase: clarify DESCRIPTION section”
  1. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 8, 2025
  2. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 8, 2025
  3. Junio C HamanoAug 8, 2025
  4. Julia EvansAug 8, 2025
  5. Junio C HamanoAug 8, 2025
  6. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 8, 2025
  7. Junio C HamanoAug 8, 2025
  8. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 8, 2025
  9. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 8, 2025
  10. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 8, 2025
  11. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 8, 2025
  12. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 8, 2025
  13. Junio C HamanoAug 8, 2025
  14. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 8, 2025
  15. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 8, 2025
  16. Junio C HamanoAug 8, 2025
  17. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 8, 2025
  18. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 8, 2025
  19. Junio C HamanoAug 8, 2025
  20. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 8, 2025
  21. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 8, 2025
  22. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 8, 2025
  23. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 8, 2025
  24. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 8, 2025
  25. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 8, 2025
  26. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 9, 2025
  27. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 9, 2025
  28. Phillip WoodAug 10, 2025
  29. Patrick SteinhardtAug 11, 2025
  30. Karthik NayakAug 11, 2025
  31. Ben KnobleAug 11, 2025
  32. Karthik NayakAug 12, 2025
  33. Junio C HamanoAug 12, 2025
  34. Phillip WoodAug 11, 2025
  35. Karthik NayakAug 12, 2025
  36. D. Ben KnobleAug 12, 2025
  37. Junio C HamanoAug 12, 2025
  38. Karthik NayakAug 14, 2025
  39. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 9, 2025
  40. Patrick SteinhardtAug 11, 2025
  41. Phillip WoodAug 11, 2025
  42. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 9, 2025
  43. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 9, 2025
  44. D. Ben KnobleAug 9, 2025
  45. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 9, 2025
  46. Phillip WoodAug 10, 2025
  47. symmetric difference with --left-only vs. range notationD. Ben Knoble, Aug 13, 2025
  48. Junio C HamanoAug 13, 2025
  49. Patrick SteinhardtAug 11, 2025
  50. Ben KnobleAug 11, 2025
  51. Patrick SteinhardtAug 11, 2025
  52. Julia EvansAug 11, 2025
  53. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 11, 2025
  54. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 11, 2025
  55. Junio C HamanoAug 11, 2025
  56. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 11, 2025
  57. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 11, 2025
  58. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 11, 2025
  59. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 11, 2025
  60. Junio C HamanoAug 11, 2025
  61. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 11, 2025
  62. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 11, 2025
  63. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 11, 2025
  64. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 11, 2025
  65. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 11, 2025
  66. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 11, 2025
  67. Junio C HamanoAug 11, 2025
  68. Julia EvansAug 11, 2025
  69. Junio C HamanoAug 11, 2025
  70. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 12, 2025
  71. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 12, 2025
  72. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 12, 2025
  73. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 12, 2025
  74. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 12, 2025
  75. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 12, 2025
  76. Junio C HamanoAug 14, 2025
  77. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 15, 2025
  78. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 15, 2025
  79. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 15, 2025
  80. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 15, 2025
  81. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 15, 2025
  82. Junio C HamanoAug 15, 2025
  83. Phillip WoodAug 18, 2025
  84. Junio C HamanoAug 18, 2025
  85. Julia EvansAug 19, 2025
  86. Junio C HamanoAug 19, 2025
  87. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 15, 2025
  88. Phillip WoodAug 18, 2025
  89. 0/5 doc: git-rebase: clarify DESCRIPTION sectionJulia Evans via GitGitGadget, Aug 23, 2025
  90. 1/5 doc: git-rebase: start with an exampleJulia Evans via GitGitGadget, Aug 23, 2025
  91. 2/5 doc: git rebase: dedup merge conflict discussionJulia Evans via GitGitGadget, Aug 23, 2025
  92. 3/5 doc: git rebase: clarify arguments syntaxJulia Evans via GitGitGadget, Aug 23, 2025
  93. 4/5 doc: git-rebase: move --onto explanation downJulia Evans via GitGitGadget, Aug 23, 2025
  94. 5/5 doc: git-rebase: update discussion of internalsJulia Evans via GitGitGadget, Aug 23, 2025
  95. Phillip WoodAug 13, 2025
  96. Julia EvansAug 13, 2025
  97. Junio C HamanoAug 14, 2025
  98. Phillip WoodAug 15, 2025
  99. Junio C HamanoAug 15, 2025
  100. Phillip WoodAug 15, 2025
  101. Julia EvansAug 15, 2025
  102. Phillip WoodAug 15, 2025
  103. D. Ben KnobleAug 9, 2025

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.