git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Julia Evans via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: "D. Ben Knoble" <ben.knoble@gmail.com>,
	Patrick Steinhardt <ps@pks.im>,
	Karthik Nayak <karthik.188@gmail.com>,
	Julia Evans <julia@jvns.ca>
Subject: Re: [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section
Date: Wed, 13 Aug 2025 14:31:32 +0100	[thread overview]
Message-ID: <52504ef0-7d4c-4298-af11-10477673e9d0@gmail.com> (raw)
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

>   * 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

> 
> 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
> 


  parent reply	other threads:[~2025-08-13 13:31 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 ` [PATCH v2 0/5] doc: git-rebase: clarify DESCRIPTION section Julia Evans via GitGitGadget
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           ` Phillip Wood [this message]
2025-08-13 15:33             ` [PATCH v6 0/5] doc: git-rebase: clarify DESCRIPTION section 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=52504ef0-7d4c-4298-af11-10477673e9d0@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=julia@jvns.ca \
    --cc=karthik.188@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=ps@pks.im \
    /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).