git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Julia Evans <julia@jvns.ca>
Subject: [PATCH v2 0/5] doc: git-rebase: clarify DESCRIPTION section
Date: Fri, 08 Aug 2025 19:15:20 +0000	[thread overview]
Message-ID: <pull.1949.v2.git.1754680525.gitgitgadget@gmail.com> (raw)
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

  parent reply	other threads:[~2025-08-08 19:15 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-08 15:24 [PATCH 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-08 15:24 ` [PATCH 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-08 16:30   ` Junio C Hamano
2025-08-08 17:13     ` Julia Evans
2025-08-08 18:11       ` Junio C Hamano
2025-08-08 15:24 ` [PATCH 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-08 17:48   ` Junio C Hamano
2025-08-08 15:24 ` [PATCH 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-08 15:24 ` [PATCH 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-08 15:24 ` [PATCH 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-08 19:15 ` Julia Evans via GitGitGadget [this message]
2025-08-08 19:15   ` [PATCH v2 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-08 23:31     ` Junio C Hamano
2025-08-08 19:15   ` [PATCH v2 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-08 19:15   ` [PATCH v2 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-08 21:09     ` Junio C Hamano
2025-08-08 19:15   ` [PATCH v2 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-08 19:15   ` [PATCH v2 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-08 21:54     ` Junio C Hamano
2025-08-08 22:52   ` [PATCH v3 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-08 22:52     ` [PATCH v3 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-08 22:52     ` [PATCH v3 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-08 22:52     ` [PATCH v3 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-08 22:52     ` [PATCH v3 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-08 22:52     ` [PATCH v3 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-09  1:14     ` [PATCH v4 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-09  1:14       ` [PATCH v4 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-10 15:41         ` Phillip Wood
2025-08-11  8:46         ` Patrick Steinhardt
2025-08-11  9:13         ` Karthik Nayak
2025-08-11 12:27           ` Ben Knoble
2025-08-12  9:05             ` Karthik Nayak
2025-08-12 14:30               ` Junio C Hamano
2025-08-11 13:07           ` Phillip Wood
2025-08-12  9:07             ` Karthik Nayak
2025-08-12 17:07               ` D. Ben Knoble
2025-08-12 18:07                 ` Junio C Hamano
2025-08-14  7:23                   ` Karthik Nayak
2025-08-09  1:14       ` [PATCH v4 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-11  8:46         ` Patrick Steinhardt
2025-08-11 13:02           ` Phillip Wood
2025-08-09  1:14       ` [PATCH v4 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-09  1:14       ` [PATCH v4 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-09 14:55         ` D. Ben Knoble
2025-08-09  1:14       ` [PATCH v4 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-10 15:42         ` Phillip Wood
2025-08-13 18:55           ` symmetric difference with --left-only vs. range notation D. Ben Knoble
2025-08-13 21:40             ` Junio C Hamano
2025-08-11  8:46         ` [PATCH v4 5/5] doc: git-rebase: update discussion of internals Patrick Steinhardt
2025-08-11 12:29           ` Ben Knoble
2025-08-11 13:45             ` Patrick Steinhardt
2025-08-11 19:34           ` Julia Evans
2025-08-11 20:12       ` [PATCH v5 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-11 20:12         ` [PATCH v5 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-11 20:50           ` Junio C Hamano
2025-08-11 20:12         ` [PATCH v5 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-11 20:12         ` [PATCH v5 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-11 20:12         ` [PATCH v5 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-11 20:12         ` [PATCH v5 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-11 21:14           ` Junio C Hamano
2025-08-11 21:51         ` [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-11 21:51           ` [PATCH v6 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-11 21:51           ` [PATCH v6 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-11 21:51           ` [PATCH v6 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-11 21:51           ` [PATCH v6 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-11 21:51           ` [PATCH v6 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-11 22:10             ` Junio C Hamano
2025-08-11 22:42               ` Julia Evans
2025-08-11 21:59           ` [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section Junio C Hamano
2025-08-12 13:49           ` [PATCH v7 " Julia Evans via GitGitGadget
2025-08-12 13:49             ` [PATCH v7 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-12 13:49             ` [PATCH v7 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-12 13:49             ` [PATCH v7 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-12 13:49             ` [PATCH v7 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-12 13:49             ` [PATCH v7 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-14 21:28               ` Junio C Hamano
2025-08-15 16:52             ` [PATCH v8 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-15 16:52               ` [PATCH v8 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-15 16:52               ` [PATCH v8 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-15 16:52               ` [PATCH v8 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-15 16:52               ` [PATCH v8 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-15 21:05                 ` Junio C Hamano
2025-08-18 13:42                   ` Phillip Wood
2025-08-18 17:06                     ` Junio C Hamano
2025-08-19 15:03                       ` Julia Evans
2025-08-19 19:45                         ` Junio C Hamano
2025-08-15 16:52               ` [PATCH v8 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-18 13:43               ` [PATCH v8 0/5] doc: git-rebase: clarify DESCRIPTION section Phillip Wood
2025-08-23  0:42               ` [PATCH v9 " Julia Evans via GitGitGadget
2025-08-23  0:42                 ` [PATCH v9 1/5] doc: git-rebase: start with an example Julia Evans via GitGitGadget
2025-08-23  0:42                 ` [PATCH v9 2/5] doc: git rebase: dedup merge conflict discussion Julia Evans via GitGitGadget
2025-08-23  0:43                 ` [PATCH v9 3/5] doc: git rebase: clarify arguments syntax Julia Evans via GitGitGadget
2025-08-23  0:43                 ` [PATCH v9 4/5] doc: git-rebase: move --onto explanation down Julia Evans via GitGitGadget
2025-08-23  0:43                 ` [PATCH v9 5/5] doc: git-rebase: update discussion of internals Julia Evans via GitGitGadget
2025-08-13 13:31           ` [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section Phillip Wood
2025-08-13 15:33             ` Julia Evans
2025-08-14 21:18               ` Junio C Hamano
2025-08-15 10:25                 ` Phillip Wood
2025-08-15 15:45                   ` Junio C Hamano
2025-08-15 15:54                     ` Phillip Wood
2025-08-15 15:56                       ` Julia Evans
2025-08-15 10:25               ` Phillip Wood
2025-08-09 15:04   ` [PATCH v2 " D. Ben Knoble

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.1949.v2.git.1754680525.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=julia@jvns.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).