Article View: linux.kernel.git
Article #3726Re: [PATCH] doc: add tutorial on branches for beginners
From: Ben Knoble
Date: Tue, 24 Nov 2026 19:04
Date: Tue, 24 Nov 2026 19:04
108 lines
14863 bytes
14863 bytes
> Le 24 nov. 2026 à 10:56, Julia Evans <julia@jvns.ca> a écrit :
>
>
>>
>>> 1. Introduce some imaginary characters who are learning branches for the
>>> first time and examples of workflows they might use. Test readers
>>> said this was helpful because it helped them see different ways
>>> they might use branches.
>> This is extremely helpful, not least because of what it does for this doc, but
>> because it sets up future guides to refer back to well-known scenarios. In
>> particular, I'm mulling on a triangular workflow guide, which could feasibly be
>> one component of a guide to collaboration with remotes; these characters will
>> have different things to say about remotes!
>
> Cool! I think probably we'd want to re-introduce the characters each time (and maybe even choose different characters depending on the situation). For a more advanced workflow the characters might be different.
>
>>> +Step 8: Create another branch
>>> +-----------------------------
>>> +
>>> +Now create a second branch called `add-animals`. We're creating two
>>> +branches to show what the process of working on multiple changes at the
>>> +same time looks like.
>>> +
>>> +First, switch back to the `main` branch. This is important because
>>> +normally when you start a new branch, you'll start it from the
>>> +current `main`.
>>> +
>>> +We normally start from `main` because if you create a branch called `two`
>>> +while on the `one` branch, merging `two` into `main` will also
>>> +merge `one`. Starting from `main` keeps all the branches separate.
>> This feels a bit confusing to me on first read, if only because the "two" and
>> "one" branches are hypothetical (and because we haven't covered merges yet).
>> I don't love to keep the reader in suspense ("we'll explain why we do this
>> later"), but I do wonder if we can give a better demonstration of what happens
>> when we stack a branch like this by using the example names here?
>>
>> Perhaps we can start with the idea that we want to keep work independent
>> ("Branches are a tool to organize your work", "working on multiple unrelated
>> changes"), and then after merges are introduced we can revisit the stacked
>> version and show what happens in that scenario? There are pros and cons to
>> stacking, but I think covering "branch per independent idea" as the norm is a
>> good way to handle it.
>
> I like this, I'll try just saying "You'll usually want to start all new branches from the `main` branch
> to keep your branches independent from each other."
>
> I agree it's weird to talk about merging since we haven't introduced it yet. I'll take that out.
>
> I think stacking is probably too advanced for this beginner tutorial.
>
>>> ...
>> Here are the last handful of sections, and 2 paragraphs that come between what I
>> see as major sections. Here alas flat text bites us a bit: it's not particularly
>> evident that step 13 + it's merge conflict note form "the end" of the practicum,
>> and the stuff afterwards is (somewhat) back to the introductory concept idea or
>> examples.
>
> I agree the last few sections are pretty messy, thanks for finding that.
>
> I've reorganized things for v2 like this::
>
> - Move the "merge conflicts" section into a note
> - Move the "3 ways to think about branch" inline in the step-by-step tutorial, after step 6 (next to the example it's talking about)
> - Rename the section about workflows to "Examples of using branches to collaborate" to make it clear that the `git pull` section is a subsection of the overall workflows section
> - Add a little overview at the beginning explaining the structure of the document:
>
> This tutorial contains:
>
> 1. <<intro,An introduction to branches>>
> 2. <<tutorial,A step-by-step practical tutorial>>
> 3. <<workflows,Example collaboration workflows>>
> 4. <<tip,Tips, GUI tools, and where to learn more>>
>
> "Tips, GUI tools, and where to learn more" is still a little bit of a grab bag at the end but at least it's laid out at the beginning now
>
> Thanks for the review!
All sounds great to me :)
Technical Details
Message-ID:
<6F694BC8-2260-4E06-BF0A-CC284F03616D@gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76248-linux-kernel-git=dewy.ruReferences:
<074bd710-1c32-4fec-9ddf-97157bd498b5@jvns.ca>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76248-linux-kernel-git=dewy.ru From: ben.knoble@gmail.com (Ben Knoble) Newsgroups: linux.kernel.git Subject: Re: [PATCH] doc: add tutorial on branches for beginners Date: Tue, 24 Nov 2026 14:04:33 -0500 Organization: Usenet Network Message-ID: <6F694BC8-2260-4E06-BF0A-CC284F03616D@gmail.com> References: <074bd710-1c32-4fec-9ddf-97157bd498b5@jvns.ca> MIME-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="16492"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:QNTPDMmjaBRNsF4SRgSDzYXTGSo= sha256:OCHJQR7pdvytc5N/J/FiC8moRk4sF2ynG5mciZKTmuc= sha1:RAL+Y6JeQm/xcLAov4dF18L/xlI= sha256:WyG6xD9lWpqGUZU92iyUm/8ApHzskqx22fdroILg2LY= 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 454D5125E2D; Tue, 24 Nov 2026 22:05:01 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.049 X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31 tests=[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 RnWwFPgs5JeK; Tue, 24 Nov 2026 22:04:58 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76248-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id B8DE9125E22; Tue, 24 Nov 2026 22:04:48 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 3DCEB3CCF4; Tue, 24 Nov 2026 19:04:47 +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=1795547087; b=vAEwIISJKiJu/H2uBcMLvR1s6KfP1fbEX7l2506UTscR4GvA1Vik6+yhl248eI8nSFiR J1GDk/T1kSlcWIDzYrdus9pyn4i4rJN2owF5c5AlklDZoL6kiRkDJ5jdzKDaC5XXwTF6e rypxtUi32cQ99fAITuqyc8IdYyGdmcPAtPFzLJPpy0J35HKOSzuy/s8I9tcZzU09KGy+z JdHf5seSb/wQaXqihKFgvdy4i5VG3DUx3rS8XC93wPMKhLhMSZ3cgV6f7MwRC54rmfoas ZveK7uoOwKTLXNandwTbg/EfwQqY2zmnuSiRRqHTUzoYtI8rj27/IClvLfgc/2RPURA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795547087; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted: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=AmJ/S4XaOA8lG5+Jh1OFrugl87oVpjF5GU4FYG9swdc=; b=QACOjw5h881y1ZVrWo6ukcJivr/Mdhw/Iz0Nr1uucxlIU1cmVXhDOvJeOFaM9xskGWj8 J1yiuzhEqRnRA+P4NNReLB1QeLZtAlRLOlQtH+OlFQkl2IBUTxhlwA5FnjmxgBUWlcffz fB5JhDiExbE38ACBzJnYEnWkYFZZhJ3yl1vfEPyf9iUmUkqTHpXSY0IyUZdb1gx4jcF3C s1CgQGmIc+XaDL2D4+B/6aP8PEKC2vtJ318GFd1jk0K0CsyBqA9haZ8DNFEDlAB8by761 8w3EgDjW4RWF8zyDbHzSAVZ57Frg7uzKFLoNx24AFy6C3JHpRMPvkmGfsSWYjkjdkqw== 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=VcF+6ICx; 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 15D1D606A32D; Tue, 24 Nov 2026 19:04:47 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=VcF+6ICx X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.44 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795547086; b=nSi94/g3KO1zNr1RRUYmBB1TxWoKWtwMBU0qEjcR5ybMSo03Ae1YTo06Sp5/sMg3EkRB AFaS0nUtgZqKy6NmJsNLIizLjcNhG+pHLBQ34IT6wwIvm2zZwNMkRPzXXbYkpsTYJ3bIa VsaUFT0GYCKK1smIhHcUFLv5EfXPRtoNaUNqG6zsKNNSBbp5GYzsG1aP/CQENnidMncrN Rz73yuZ39heB9GbwRtIdRVrhiuXmcR4tGSWB9yVPPzEGBpGE2SQT5KTzgq8ICZTzs8+oq z6460wDvXGcBD/ReLSqYDom4FKI2+FIeZPbf9omnIEwruB343Iw4MR2CULYLc2PODAw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795547086; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted: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=AmJ/S4XaOA8lG5+Jh1OFrugl87oVpjF5GU4FYG9swdc=; b=uJ2kUMQnaH/sFaoVvjM7e/NuZhp7VuKya9gezbStFP412HQ+vLIuORNI2BuKxACcS0TJ WCdsk0OTFvRP49j+KD0lPOhGH3E+DtrRQPoTJYlVoPZT71ZTKeeW4VURcl5BNvjIjaEd1 Y4uPr1R/m/IMARRAahHT3QrRFfZqPJmn34hMjZsFpj9Dj4EtEtBCG2JACghrYMVxZ3GdR ICBmGPX1RJjAy3e41MCmBfyLniSyBwV+kYz0CxeYMq1pIb14IJMwFW2uLmdKqc0bueOK4 LF8L4mHE5+B7uUSVhe6uSm0yMrbFGPCFw26UFRqKdw2jZcCBa9C6gvqMqtIGyPnV0eA== 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=VcF+6ICx; arc=none smtp.remote-ip=74.125.224.44 X-Received: from mail-yx1-f44.google.com (mail-yx1-f44.google.com [74.125.224.44]) (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 D5429606A327 for <git@vger.kernel.org>; Tue, 24 Nov 2026 19:04:45 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D5429606A327 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-f44.google.com with SMTP id 956f58d0204a3-67921b515a7so5298891d50.2 for <git@vger.kernel.org>; Tue, 24 Nov 2026 11:04:45 -0800 (PST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795547085; x=1796151885; 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=AmJ/S4XaOA8lG5+Jh1OFrugl87oVpjF5GU4FYG9swdc=; b=VcF+6ICxMd8zT1syTRo+M7qn3fDUdgBi1kXCH8WLmuFH9pS1yxbusmPIrdLhzETg0o Cq3170O1XeLhxD+d7RrFTdQKWVDudnA8ck4lt/l5wmTXP0+k3VJ7uvSLDBXbsJyO0c8+ TWOm2ALrwMahnhuZCX1gHVhbM91rOkT/QGmr1QITylYEl33A0sQ2SGckf8A5hRbO6MzF A+Fp8RyiNWwWSu8+0+e35A1q/CrVyH+UA4uWpQ9JorV06KoEIeqBiPMGufI9Dsz705W0 qNLzWNIUKJxju8pZj/S4nWHFs93KIoGpi+dvuYZURW/SwxqImGh4YFuAplNTD8Uc8CsF OcbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795547085; x=1796151885; 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=AmJ/S4XaOA8lG5+Jh1OFrugl87oVpjF5GU4FYG9swd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qKnn7CHBB0cc1O6CpTCyFh977yut3Ox7ex pY9QSnkjKyZyWeuj1ZmRZ+ZIIUd3qfGoSGuur3u2EtTfWmrxIeiOtysf5v+akpB3+h0lMq11wlJ lE9YumYBB51DvUKQ1zsyiv+mAiX7GziOxPjTkzJgpdfuroX3BiCh4QqObQhHjdGtWR/I1WsvpsN +nUPZj8NTe9qzoKDN/k2krAW5Iatq6nZpz4bkNWBtz650NGHO/tqlZ0J8dFoXLnxr0jkIGx0sJM zUuA== X-Received: by 2002:a05:690e:168a:b0:67d:a4e2:eccd with SMTP id 956f58d0204a3-67df4494c09mr7139224d50.101.1795547084797; Tue, 24 Nov 2026 11:04:44 -0800 (PST) X-Received: from smtpclient.apple ([2605:a601:9d46:600:f854:fa55:5df9:927f]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67df3378f59sm7164077d50.14.2026.11.24.11.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2026 11:04: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: Julia Evans via GitGitGadget <gitgitgadget@gmail.com>, git@vger.kernel.org, Patrick Steinhardt <ps@pks.im> X-In-Reply-To: <074bd710-1c32-4fec-9ddf-97157bd498b5@jvns.ca> X-Mailer: iPhone Mail (23D8133)