All of lore.kernel.org
 help / color / mirror / Atom feed
From: Weijie Yuan <kernel@wyuan.org>
To: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Randy Dunlap <rdunlap@infradead.org>
Cc: workflows@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] docs: submitting-patches: use git switch to create branches
Date: Sat, 26 Sep 2026 14:45:45 +0800	[thread overview]
Message-ID: <ardqGdjnd7kC1B-E@wyuan.org> (raw)

From: Weijie Yuan <wy@wyuan.org>

Git has been promoting "git switch" since git.git commit 328c6cb853d7
(doc: promote "git switch"), and the command is no longer experimental
as of Git 2.51.0.

Suggested-by: Nguyen Duc Thinh <ducthinh100812@gmail.com>
Signed-off-by: Weijie Yuan <wy@wyuan.org>
---
 Documentation/process/submitting-patches.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
index 4c28a239e8cb..63a5550bd490 100644
--- a/Documentation/process/submitting-patches.rst
+++ b/Documentation/process/submitting-patches.rst
@@ -866,7 +866,7 @@ automatically include the base tree information in your submission by
 using the ``--base`` flag. The easiest and most convenient way to use
 this option is with topical branches::
 
-    $ git checkout -t -b my-topical-branch master
+    $ git switch -t -c my-topical-branch master
     Branch 'my-topical-branch' set up to track local branch 'master'.
     Switched to a new branch 'my-topical-branch'
 
@@ -882,7 +882,7 @@ notice that it will have the ``base-commit:`` trailer at the very
 bottom, which provides the reviewer and the CI tools enough information
 to properly perform ``git am`` without worrying about conflicts::
 
-    $ git checkout -b patch-review [base-commit-id]
+    $ git switch -c patch-review [base-commit-id]
     Switched to a new branch 'patch-review'
     $ git am patches.mbox
     Applying: First Commit
-- 
2.55.0.1055.g20c0e7c0fb.dirty


             reply	other threads:[~2026-09-26  6:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26  6:45 Weijie Yuan [this message]
2026-10-18  6:22 ` [PATCH] docs: submitting-patches: use git switch to create branches Nguyen Duc Thinh
2026-10-18 11:54   ` Weijie Yuan
2026-11-04  2:31 ` Weijie Yuan
2026-12-02 20:01 ` Jonathan Corbet
2026-12-04  9:41   ` Weijie Yuan

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=ardqGdjnd7kC1B-E@wyuan.org \
    --to=kernel@wyuan.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=skhan@linuxfoundation.org \
    --cc=workflows@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.