From: Phillip Wood Date: Mon, 11 Aug 2025 13:07:43 GMT Subject: Re: [PATCH v4 1/5] doc: git-rebase: start with an example Message-ID: <84258154-322c-4ef0-9ebb-44858a5d58fc@gmail.com> In-Reply-To: On 11/08/2025 10:13, Karthik Nayak wrote: > "Julia Evans via GitGitGadget" writes: >> + >> +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 >> +shortcut for `git checkout topic && git rebase master`. >> + > > Nit: now that `git-switch(1)` is no longer experimental, we should start > recommending it over `git-checkout(1)` as necessary. So perhaps, we > could s/checkout/switch here? Junio has already expressed a preference for "checkout" here c.f. . I think that is technically correct as "topic" can be a commitish and "git switch " fails without "--detach". Also rebase does not do any of the extra checks that "git switch" does before switching branches (I'm not saying that is necessarily a good thing). Thanks Phillip