🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #2350

Re: [PATCH] branch doc: consistently promote 'switch'

#2350
From: Ben Knoble
Date: Wed, 04 Nov 2026 17:52
55 lines
12661 bytes
> Le 3 nov. 2026 à 16:59, Junio C Hamano <gitster@pobox.com> a écrit :
> 
> When 328c6cb853 (doc: promote "git switch", 2019-03-29) updated an
> example in git-branch documentation, it made an inconsistent change
> to turn "git checkout my2.6.14" command in an example into "git
> switch my2.6.14", without updating a comment that talks about a
> shorthand to create and checkout the newly created branch at the
> same time, which still talked about "checkout -b <new> <start>".
> 
> Update the latter to talk about "git switch -c" for consistency.
> 
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
> * An alternative would be to list both "git checkout -b" and "git
>   switch -c", as "git checkout" is not going away (for the purpose
>   of *replacing* checkout, the switch/restore were a failed
>   experiment, even though they gained enough users to stay).
> 
> Documentation/git-branch.adoc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git c/Documentation/git-branch.adoc w/Documentation/git-branch.adoc
> index bfdf459329..a803c24858 100644
> --- c/Documentation/git-branch.adoc
> +++ w/Documentation/git-branch.adoc
> @@ -406,17 +406,17 @@ Start development from a known tag::
> ------------
> $ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
> $ cd my2.6
> $ git branch my2.6.14 v2.6.14   <1>
> $ git switch my2.6.14
> ------------
> +
> <1> This step and the next one could be combined into a single step with
> -    "checkout -b my2.6.14 v2.6.14".
> +    "git switch -c my2.6.14 v2.6.14".
> 
> Delete an unneeded branch::
> +
> ------------
> $ git clone git://git.kernel.org/.../git.git my.git
> $ cd my.git
> $ git branch -d -r origin/todo origin/html origin/man   <1>
> $ git branch -D test                                    <2>

All sensible to me. 

FWIW, the more folks I teach about switch the more folks tell me they have,
ahem, switched. And prefer it!
Technical Details
Message-ID: <6EBBE956-4824-4398-B33D-F4E5F58040D1@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74461-linux-kernel-git=dewy.ru
References: <xmqqwlqt4lwj.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-74461-linux-kernel-git=dewy.ru
From: ben.knoble@gmail.com (Ben Knoble)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] branch doc: consistently promote 'switch'
Date: Wed, 4 Nov 2026 12:52:34 -0500
Organization: Usenet Network
Message-ID: <6EBBE956-4824-4398-B33D-F4E5F58040D1@gmail.com>
References: <xmqqwlqt4lwj.fsf@gitster.g>
MIME-Version: 1.0 (1.0)
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3457843"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:mw8Gq+oQMdWZGCx1/n1Q5RG+fRo= sha256:wTEMPREsxx50EunssIhk+cyTKn84GPPUitcK2Y1S8lw=
	sha1:Sem4VeNLOeOTX7svk4aELA730N4= sha256:PCuZ6JxzcMzYBkfAcbJlK1r0oeXujK7/yF+B9uZe4rA=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id E1DF1112CE4; Wed,  4 Nov 2026 21:45:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.949
X-Spam-Status: No, score=-1.949 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id katWAX7jQxXM;
	Wed,  4 Nov 2026 21:45:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-74461-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 02711112C7A; Wed,  4 Nov 2026 21:45:01 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 56208436CF; Wed,  4 Nov 2026 17:58:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793814767;
	b=AyvResnsK9Ga13B6etXAZNo8t5Y86AlBdZgVTi0U2IxNQ/J0rA6S46LrBrdWM+Geup5M
	 kpbvMBX13XssFaA3ER7bCXCwmotCWKaXPsm9WyaLGZuk/5kiYVKX63HlMtX8Bgas23klF
	 LoWUdO7VgO4bD372b6G7sxvcoQay7ZD6i0nl0KhOmXz4dVUQlsavaogMnFExw7MivLY69
	 0fWyj+aGysnKVamE8nF/HwBRO/I86RmncDFSKwDoJY9P6wbYWjgQ7Jm4z8dKHWmqXS+2x
	 uWIeZKGYWk6Y55M7bryW1YAk9Q+6L4NN1DUTmArv6RehC5awxl9dzyg1b0RcTTaLWYg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793814767;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:Content-Type:Content-Transfer-Encoding:From:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:Mime-Version:Subject:Date:Message-Id:References:
	 Cc:In-Reply-To:To:X-Mailer;
	bh=59DYfinUZ0XjgE8n+3sAdQAp053ffGArgYIT1xfQ1ok=;
	b=KWSOMxhGFkYq8FwhviGyYiBB9YsPVGHrO7M/OghiC7xChoT53+1AYoiibVd2uYBkWeLy
	 kx4HDKzwF0Mm52I8IWRqfSZ6wDYP7N5bhNMv+IqcUh+H6gxMDEUUYhfGiyKUz/cf2wHET
	 7814YGv+yLk6GHQTQpvDwpNReMAnIm2lywGvdf01jWxn+zOAFrDo2RYx2TDOWHqtVlFZb
	 dDX/alTfF8HpSubWQR/H19Ior/DN4Rdr3rRuWbwMqAi7tAjqS9iiRI1gmsM3BvAEp7Ldt
	 aTlvl4kW+Iogq47fLEx6OVYMiO/ADoBBeh7lMMyRbnvk1tT5E31BtFNNa5k9JxLcUzw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=UFq2u25T;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 617676070B0B;
	Wed,  4 Nov 2026 17:52:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=UFq2u25T
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793814766;
	b=u44Q6Mgp3oT5WMOFK0VxZNqclw6Pt6tO9UnEAb1Be1Ablipby40Q6OOAbOl1LU+6Zonb
	 jKYUxLYitZdDnlfHUDowrmDgEcTIA7tMJJYkqgvNf5voNqw1JrpPs+wYwocw+k7SAH3SZ
	 O1rY5G+SuRFDbYeyK/F4ULEKbL2z2REKbZmo3dua6RZxrOa55PpdYf8FN2gTCUNAQGV5Y
	 qakIKLJlneJU9u+p8GSluz9R/vhhbem0lBhJF4l0jCjCjLBS0E6g4E6dNCN6MB8CMmupa
	 wmsiUQ/5Dq4MPyHdBjBVpYb3nNUqazOjvWF749RBc4jXjPeUYruOarfg/DYfzmQp9fA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793814766;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Content-Type:
	 Content-Transfer-Encoding:From:Mime-Version:Subject:Date:Message-Id:
	 References:Cc:In-Reply-To:To:X-Mailer;
	bh=59DYfinUZ0XjgE8n+3sAdQAp053ffGArgYIT1xfQ1ok=;
	b=tehjIiaUcc2c5EIHrih0tOfi6aQXpwD/D63h59NJtR+QbVUBSjTd+z6eK3loWHzcr2SK
	 4ibFDVeBMnClv5kMyYMNVPoKjCmwhJDsil9m53zSz1q3s+pGOFj/GCn3LyK2/4D3i1+HU
	 xEy8gmIZm6LCNlCJnqZPWR5CJk9kMH7oSJ6a876eYMa+LT6yKkNuI9WdSwDN0jO3BtFMT
	 qjEw99zZsUQ9LozCY2vyLMBFyN4/5YJVy3F2kJVzXTXoxjjOKE2hgOeWsOyuGSXwB0RdD
	 cbsSAum0cXgIT3jFlDZfneFnMqWhKYWfR5kq//tsG+U8KL323stl9I2dwpwAZnR9OiA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=UFq2u25T;
	arc=none smtp.remote-ip=74.125.224.47
X-Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25D60606A7CB
	for <git@vger.kernel.org>; Wed,  4 Nov 2026 17:52:46 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 25D60606A7CB
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-679965fb848so1215693d50.1
        for <git@vger.kernel.org>; Wed, 04 Nov 2026 09:52:46 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793814765; x=1794419565; darn=vger.kernel.org;
        h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
         :from:content-transfer-encoding:content-type:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=59DYfinUZ0XjgE8n+3sAdQAp053ffGArgYIT1xfQ1ok=;
        b=UFq2u25TY0XKEFeMlnifc6y9j4BiefcpOPbn1kpxqZVtnnfSw8BpjfXzIvUcXrRiXJ
         Ms+GVo+quj83KC+ZVFm7f5dZZ3dUZRmpOGwHgl/vS9yU808cOypb47xMAUMr4VTHcN4i
         IYMcxa6Xb9mauCP0f/vTOzyg65fQdxBVxvC8EK11n7UDb9819rlD/J2LqcLEjpFwzx01
         R16bi8ggHr9zxZX9PLKl9c3jLsSCStiUrZQaceoXGxzsbFxqeyYxKww3hI5pxvtToYyw
         XFgakuwrUPpnmbkeZpLWnmV6Hq5nOStYllmI52dkorUlbda+9dbf4Nrai4QAYaCoxzrI
         iIXw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793814765; x=1794419565;
        h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
         :from:content-transfer-encoding:content-type:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=59DYfinUZ0XjgE8n+3sAdQAp053ffGArgYIT1xfQ1ok=;
        b=t0EEWM37SanzDfFU9ag5cCJTQPMPcu7K6zFToPJHB5P//xtwINsFrev9yDviAHqEXE
         kWtJHKYJw36Ghxmyqs5FLQ3sDCWcWBxUGuWHWndOh8ByqOiQACrmhyxPWjmLPi2X3whx
         CYIJGU8fbqELF9DGeUSiJpRdjuYXwv/R5BbsTu878LHTWchl+fMjYIetK05i/C/SlmfC
         5yARdzHfJtjc5+b9amG5ybY5fYuEnAGQaL3IBOUyTzOApabQ6jePJ3AbM9V68jlqYHzL
         vAL1zK6Jal9YL8bxorCG0nOG+ZS07qikW2/Y6rZeVIkEI0efb9uBybmLUSP9fLPQty/2
         RBZQ==
X-Gm-Message-State: APuU4Z+pTwxdjqRpPM64gNnfSe+5fxDweVD0pywz445SUjeABsAWURGA
	S4JTmL4s9xsRFK3KoeF2rJqyEdhwnh0uKKAL6tsGcVDj8/f7+HvwVyP1YIjABg==
X-Gm-Gg: AYBFou13HbHNKUuGMYFeaekLNfuzUvqYy5djYt+dr5gYTgwp89Y+q0YTNTSOPlu7Atv
	4e9NK0rRDiAvOJvGTIIOxn36YJTuiqfpGKFvIdutjamKwJ69Zq0PHcgnVp4+HPexbcTjGIiv5Od
	Vr3+y0y0N24fNBjmxMsXU03Bv4DSVJgVzBPpb77oRdsPZ6yj4DkodQjkKtBk2e1nHmzwNUki0A+
	JkKVuJBU2xEtfGUHYxrtIg51Lf8h+DFOwXQOK682YfeMs49NK3Du+X69RvfqK+5sL+zivpFHlrq
	kJTXpAG5DnrPI9xWSh8BepeCBG3F11+/2NMtM4clh7cykQlaXZVC/Wk88vkspKDDnfK/TZLGPsL
	0vFdV3ERwDmQYE/Ainvtf2qQsKH4bdrhjMhKBDhdBFtUnJkS7aGPcsbHKZ/mRYKePS+DZyy0tR0
	yX0LgjcylBpUnA6g/a4rrO4HRuC+Ko17EKzwV95cn4PlA830K1fFon7JUgF7ffLr6N9H+JZ3u7v
	yqtJ7T40fvSvLhfX/ci8h9vw8gCuxRjGgW0Kg7QodsOPYSMmFG8tuJyVla2GlARNEoVkGpR2shG
	IoUt079Dp2+Pt0aMJOABb56tYJuS7wOET1LMTLnp2DSnY7Tr9r2pzTqG6YgGbgv4D27+v0Pnfid
	oVjencZg85N7zaF7OvW7NIc5gAkKVwLS75kMNFytQD+qShUO3JzbinP1sOp2D9+9BOz0J9vnzfM
	bMvmw=
X-Received: by 2002:a05:690e:190e:b0:67b:f39c:a4cc with SMTP id 956f58d0204a3-67bf39ca66amr1082479d50.27.1793814765006;
        Wed, 04 Nov 2026 09:52:45 -0800 (PST)
X-Received: from smtpclient.apple ([2605:a601:9d46:600:c5d0:c9f2:df6f:9145])
        by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67bee245f70sm1878973d50.11.2026.11.04.09.52.44
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 04 Nov 2026 09:52:44 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: git@vger.kernel.org
X-In-Reply-To: <xmqqwlqt4lwj.fsf@gitster.g>
X-Mailer: iPhone Mail (23D8133)