From: D. Ben Knoble Date: Mon, 19 Oct 2026 21:14:53 GMT Subject: Re: [PATCH 2/2] doc: add new Git tutorial for beginners Message-ID: In-Reply-To: On Mon, Oct 19, 2026 at 4:43 PM Julia Evans wrote: > > On Mon, Oct 19, 2026, at 12:49 PM, Ben Knoble wrote: > >> Le 19 oct. 2026 à 10:25, Julia Evans a écrit : > > > > Acknowledging the original was a long email to begin with, > > > >>> On Wed, Oct 7, 2026, at 3:48 PM, D. Ben Knoble wrote: > >>>> On Tue, Oct 6, 2026 at 3:37 PM Julia Evans via GitGitGadget > >>>> wrote: > >>>> +[[step_2]] > >>>> +Step 2: Introduce yourself to Git > >>>> +--------------------------------- > >>>> + > >>>> +The first time you use Git on a computer, it's a good idea to tell Git > >>>> +your name and public email address. If you don't, you'll get a lot of > >>>> +warnings from Git. To do this, run: > >>>> + > >>>> +------------------------------------------------ > >>>> +$ git config --global user.name "Namey McName" > >>>> +$ git config --global user.email you@example.com > >>>> +------------------------------------------------ > >>>> + > >>>> +The name and email is so that other people you're collaborating with can > >>>> +know who made the changes. You can set them to anything you want. > >>>> + > >>>> +To check if the name and email have been set, you can run these > >>>> +commands: > >>>> + > >>>> +------------------------------------------------ > >>>> +$ git config user.name > >>>> +$ git config user.email > >>>> +------------------------------------------------ > >>> Ought we recommend the newer forms (git config set, git config get)? > >>> Or is the idea to remain compatible with older versions, such as the > >>> 2.32 I happen to have in /usr/bin on unsupported macOS 12.7.6 from > >>> very old (?) XCode? > > > > I think this got missed? > > It did! Because of the plain text emails it's tough for me to scan the >> and > > to see the replies (">>" and ">" look similar to me) so I missed them, I don't > know if it's possible to set up my email system to make it easier. No worries! I wonder if your client can color different nesting levels differently? My iPhone's Mail.app does this and it's really handy. > I didn't know about `git config set`, I put it on my list to think about. I > claimed at some point in this tutorial that it works on "any version above > 2.0", which is a claim I didn't actually check yet, but I do think it's valuable to > support old versions and be explicit about which Git versions you can use the > tutorial with. Sounds good. I prefer to teach folks the "set" version now, but we both care about some kind of backwards compatibility here, so I'm happy with whatever you decide. > >>>> + > >>>> +Set your default branch name to `main`, by running this command. > >>>> +Git is going to change its default branch name to `main` soon, so this > >>>> +sets you up well for the future. > >>>> + > >>>> +------------------------------------------------ > >>>> +$ git config --global init.defaultBranch main > >>>> +------------------------------------------------ > >>>> + > >>>> +If there's no output, then it succeeded. > >>>> + > >>>> +Step 3: Create an empty folder and 2 files > >>>> +------------------------------------------ > >>>> + > >>>> +In your terminal, create an empty folder and change directories into it. > >>>> +Later on you could follow the same steps in this tutorial to take an > >>>> +existing project and start managing it with Git, but we're going to use > >>>> +an empty project so that everyone following this tutorial has the exact > >>>> +same files. > >>>> + > >>>> +For example, run these commands to make a folder called `myproject` > >>>> + > >>>> +------------------------------------------------ > >>>> +$ mkdir myproject > >>>> +$ cd myproject > >>>> +------------------------------------------------ > >>> I don't know, and I'll probably bias towards what you've already > >>> written over asking for changes, but: does it make things any easier > >>> to read and follow along with if we "git init myproject" instead? > >>> Perhaps this version plants the seed that it's not too late to start > >>> tracking any existing project, though, which is valuable :) > >>> I wonder if you had some rationale for choosing this particular > >>> sequence? Just curious, now. > > > > And so was this. > > I didn't see this one either :) > > I had no idea `git init myproject` existed! I do think it's nice to > make it more obvious how you could start tracking an existing project. One of today's lucky 10,000, then! :P I'm more than happy with the mkdir && cd version, even if my fingers prefer to type less (git init ), so as before I'm happy with whatever you settle on. -- D. Ben Knoble