Git development
 help / color / mirror / Atom feed
From: Julia Evans <julia@jvns.ca>
To: "D. Ben Knoble" <ben.knoble@gmail.com>,
	Julia Evans via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] doc: add tutorial on branches for beginners
Date: Tue, 24 Nov 2026 10:56:05 -0500	[thread overview]
Message-ID: <074bd710-1c32-4fec-9ddf-97157bd498b5@jvns.ca> (raw)
In-Reply-To: <CALnO6CD6vu1ed3jw4oDceV4n0+zdsOaJGqSHhgaeEWsgGk3owg@mail.gmail.com>

>> 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!


  reply	other threads:[~2026-11-24 15:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 21:33 [PATCH] doc: add tutorial on branches for beginners Julia Evans via GitGitGadget
2026-11-09 21:56 ` Junio C Hamano
2026-11-09 22:01   ` Julia Evans
2026-11-09 22:11     ` Junio C Hamano
2026-11-10 14:31       ` Julia Evans
2026-11-18 12:43 ` Julia Evans
2026-11-23 18:05   ` D. Ben Knoble
2026-11-23 18:05 ` D. Ben Knoble
2026-11-24 15:56   ` Julia Evans [this message]
2026-11-24 19:04     ` Ben Knoble
2026-11-24 17:16 ` Junio C Hamano
2026-11-24 21:13 ` [PATCH v2] " Julia Evans via GitGitGadget
2026-11-30 15:09   ` D. Ben Knoble
2026-11-30 16:10     ` Julia Evans
2026-11-30 17:00       ` D. Ben Knoble

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=074bd710-1c32-4fec-9ddf-97157bd498b5@jvns.ca \
    --to=julia@jvns.ca \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=ps@pks.im \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox