🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Ben Knoble Tue, 24 Nov 2026 19:04
Re: [PATCH] doc: add tutorial on branches for beginners
#3726
Author: Ben Knoble
Date: Tue, 24 Nov 2026 19:04
108 lines
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 :)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads