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

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

From
Julia Evans via GitGitGadget <gitgitgadget@gmail.com>
Date
Aug 8, 2025, 19:15 UTC
Message-ID
<pull.1949.v2.git.1754680525.gitgitgadget@gmail.com>
In-Reply-To
<pull.1949.git.1754666665.gitgitgadget@gmail.com>
Thanks for the review comments, here are the new changes which:
 * make the intro to the man page less dry, with the suggested wording
 * clarify the merge conflict resolution explanation & fix the HTML
   formatting issues
 * move the explanation of the git rebase <upstream> <branch> syntax up into
   the intro

I'm still curious about the intention for the git rebase master topic syntax, since I'd never heard of it before. Is it just to save on typing, since it's fewer characters than git switch topic and then git rebase master? I ask because someone mentioned to me on Mastodon (https://hachyderm.io/@simontatham/114988051822317920) that they sometimes use git rebase HEAD main as part of their workflow, which is not equivalent to git checkout main && git rebase HEAD. That made me think that there might be some broader intent to enable rebases that wouldn't otherwise be possible without that syntax.

I'll wrap my text to 80 characters in the future, still learning the process for emailing a plain-text mailing list :)

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 | 285 ++++++++++++++++------------------
 1 file changed, 137 insertions(+), 148 deletions(-)
base-commit: 2c2ba49d55ff26c1082b8137b1ec5eeccb4337d1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1949%2Fjvns%2Fclarify-rebase-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1949/jvns/clarify-rebase-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1949
Range-diff vs v1:
 1:  ac3a91c04bf ! 1:  26b742eb49f doc: git-rebase: start with an example
     @@ Documentation/git-rebase.adoc: SYNOPSIS
       -----------
      +Transplant a series of commits onto a different starting point.
      +
     -+For example, assume the following history exists and the current branch is `topic`:
     ++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.
      +
      +------------
      +          A---B---C topic
     @@ Documentation/git-rebase.adoc: SYNOPSIS
      +    D---E---F---G master
      +------------
      +
     -+Then `git rebase master` will find all of the commits since `topic` diverged
     -+from `master` and copy the changes in each of those commits on top of the
     -+`master` branch.
     ++You want to transplant the commits you made on `topic` since it diverged from
     ++`master` (i.e. A, B, and C), on top of the current `master`.  You can do this
     ++by running `git rebase master` while the `topic` branch is checked out.  If you
     ++want to rebase `topic` while on another branch, `git rebase master topic` is a
     ++short-cut for `git switch topic && git rebase master`.
      +
      +------------
      +                  A'--B'--C' topic
 2:  f4f0a5a1172 ! 2:  249a5127904 doc: git rebase: dedup merge conflict discussion
     @@ Commit message
          Signed-off-by: Julia Evans <julia@jvns.ca>
      
       ## Documentation/git-rebase.adoc ##
     -@@ Documentation/git-rebase.adoc: from `master` and copy the changes in each of those commits on top of the
     +@@ Documentation/git-rebase.adoc: short-cut for `git switch topic && git rebase master`.
           D---E---F---G master
       ------------
       
      +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:
     ++first problematic commit and leave conflict markers. If this happens, you can do
     ++one of these things:
      +
      +1. Resolve the conflict. You can use `git diff` to find the markers (<<<<<<)
      +   and make edits to resolve the conflict. For each file you edit, you need to
     -+   tell Git that the conflict has been resolved. Typically this would be
     -+   done with
     -+
     -+   git add <filename>
     -+
     -+   You can then continue the rebasing process with
     ++   tell Git that the conflict has been resolved. You can mark the conflict as
     ++   resolved with  `git add <filename>`. After resolving all of the conflicts,
     ++   you can continue the rebasing process with
      +
      +   git rebase --continue
      +
 3:  b27117ea19a ! 3:  ce7ab74ea0f doc: git rebase: clarify arguments syntax
     @@ Metadata
       ## Commit message ##
          doc: git rebase: clarify arguments syntax
      
     -    I found this extremely hard to understand as it was and this seemed like
     -    a clearer wording to me.
     +    This removes the explanation of `git rebase <upstream> <branch>`, since
     +    it was already explained above that it's shorthand for `git switch
     +    <branch> && git rebase <upstream>`
      
          Signed-off-by: Julia Evans <julia@jvns.ca>
      
       ## Documentation/git-rebase.adoc ##
     -@@ Documentation/git-rebase.adoc: first problematic commit and leave conflict markers. If this happens, you can:
     +@@ Documentation/git-rebase.adoc: one of these things:
       
          git rebase --skip
       
     -+`git rebase <upstream> <branch>` is shorthand for `git switch <branch>`
     -+followed by `git rebase <upstream>`.
     - 
     +-
      -If `<branch>` is specified, `git rebase` will perform an automatic
      -`git switch <branch>` before doing anything else.  Otherwise
      -it remains on the current branch.
 4:  28b00d3b32f = 4:  590d7486d3d doc: git-rebase: move --onto explanation down
 5:  7d4dc6d2c04 = 5:  ad97cd9e671 doc: git-rebase: update discussion of internals
-- 
gitgitgadget
Previous: Julia Evans via GitGitGadgetNext: Julia Evans via GitGitGadget
Message 11 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.