From: "Julia Evans via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: "D. Ben Knoble" <ben.knoble@gmail.com>,
Tuomas Ahola <taahol@utu.fi>,
Richard Kerry <richard.kerry@atos.ai>,
Julia Evans <julia@jvns.ca>
Subject: [PATCH v4 0/2] doc: add new git tutorial
Date: Wed, 28 Oct 2026 14:44:45 +0000 [thread overview]
Message-ID: <pull.2248.v4.git.1793198687.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2248.git.1791315422.gitgitgadget@gmail.com>
So far we've gotten 112 comments from 30ish beta testers who have tried to
learn Git for the first using this tutorial. Most of them were able to
finish it successfully. By far the most common piece of feedback was that
people want to learn more about collaboration and branching. I've written a
draft of a tutorial on branching, but this is already quite a lot of words
so definitely we can't cover it in this series.
I don't know if it's possible to get this merged quickly, but if it were I
think it would be amazing since people are so eager for a tutorial on
branching. If we spend a huge amount of time revising this I think there's a
real risk I'll run out of funding before we have time to write about
branching. Ideally I think it would be great if we could merge a "good
enough" version and then have a way on the website for users to give
feedback on it, so that we can later incorporate that feedback and
iteratively make it better over time.
Thanks to Paula, Agavi, Ken Wells, Michael / Chgowiz, Ishmaeel, and all 20
or so other test readers.
changes in v3: (v2 was the "first" real version since v1 was a WIP)
* Say that the tutorial supports any version above 2.23.0, when git switch
was introduced, since the next part of the tutorial on branches will use
git switch
* Mention that on Windows the tutorial will work best in Git Bash for and
it might need adapting for PowerShell. (thanks to Ben)
* Add a warning about how Git can dump you into vi, how to handle that
situation, and how to write a longer commit message. I tried to strike a
balance between lightly suggesting that it might be good to write longer
commit messages, while making it clear that you can just use -m"" if
you're not ready to navigate the world of editor configuration. I don't
think we can use Pro Git here though since it's a bit outdated. (thanks
to Ben)
* Add Helped-by: Ben ...
* Add output of "ls ~/.ssh/*.pub" (thanks to a test reader)
* Suggest cat ~/.ssh/whatever.pub to make it clearer how to copy the
contents of the file. One of the test readers said this was unclear as
well. (thanks to Junio)
* Mention that the public key might not be called ed25519.pub (thanks to
Junio)
* Add a short section on the importance of git status
* Fixed the formatting around the headings. Kept it in the same style
because I had issues with the docs linter when using == DESCRIPTION
(thanks to Junio)
* explain what --set-upstream does (thanks to Ben)
* A few other small phrasing fixes from test readers
non-changes in v3:
* didn't use git config set since the tutorial claims to be compatible with
Git 2.23.0
* kept using the term "folders" since my impression is that Mac OS and
Windows use the term "folder" and those operating systems are more
popular than Linux. I don't think any test readers were confused by this
term, though "directories" might be fine too.
* leave git init instead of git init myproject so that folks can use the
same process when setting up Git in an existing project
changes in v4:
Make the instructions more Windows-friendly (thanks to Richard Kerry), by:
* mentioning that Git for Windows will ask you to configure a text editor
when you install it
* saying that the SSH instructions are Mac/Linux only and suggesting using
Git Credential Manager on Windows, and update the instructions for
whether to use an HTTPS/SSH URL accordingly
* using "folder" instead of "directory" in a few more places Also:
* Say "bottom left" (thanks to Ben)
* Add a link to how to configure various text editors
https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Setup-and-Config#ch_core_editor
(thanks to Ben)
non-changes in v4:
* leave the comment about how vim is "extremely difficult if you're not
used to it" alone, I couldn't come up with a better way to communicate it
and I really don't want anyone to think that being able to use vim is
expected.
Julia Evans (2):
doc: remove gittutorial
doc: add new Git tutorial for beginners
Documentation/gittutorial.adoc | 1051 ++++++++++++++++++--------------
1 file changed, 589 insertions(+), 462 deletions(-)
base-commit: 47fdf2208c5b94c8cc01c106b8f7c85efb91c926
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2248%2Fjvns%2Fgit-tutorial-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2248/jvns/git-tutorial-v4
Pull-Request: https://github.com/gitgitgadget/git/pull/2248
Range-diff vs v3:
1: 8c0366e996 = 1: 64d9811539 doc: remove gittutorial
2: d8ea142af6 ! 2: 4b40588c90 doc: add new Git tutorial for beginners
@@ Commit message
policy if applicable since the "easiest way" may not be the best), and
giving some instructions for how to translate an HTTPS URL to an SSH
URL.
+ - Use Git Credential Manager for authentication on Windows, since it's
+ simpler, SSH auth is a very "unixy" thing to do, and it comes with
+ Git for Windows
- Warn people about how `vi` is the default text editor and give some
instructions for how to escape
@@ Documentation/gittutorial.adoc (new)
+commit is up to you.
+
+When Git stores a commit, it stores a copy of every file in the commit
-+in a database in a directory called `.git`. This is called a "Git repository".
++in a database in a folder called `.git`. This is called a "Git repository".
+
+In this tutorial we're going to show you how to:
+
-+1. Create a Git repository in a directory with the command `git init`.
-+ This creates the `.git` directory where Git stores all your commits.
++1. Create a Git repository in a folder with the command `git init`.
++ This creates the `.git` folder where Git stores all your commits.
+2. Tell Git which files you want to put in a commit
+3. Make a commit
+4. Change a file and make a new commit with the new version
@@ Documentation/gittutorial.adoc (new)
+1. Git to be installed. You might already have it installed,
+ and if not there are directions at https://git-scm.com/install/
+2. A terminal to use. On Windows, you can use Git Bash which comes
-+ when you install Git. For Windows this tutorial will assume you're
-+ using Git Bash and if not you might need to adjust some commands like
-+ `ls` and `cat`.
++ when you install Git.
+
+You can check if Git is installed by running this in your terminal:
+
@@ Documentation/gittutorial.adoc (new)
+$ cd myproject
+------------------------------------------------
+
-+Next, using your text editor, create a file in this directory, so we
++Next, using your text editor, create a file in this folder, so we
+have something to work with.
+
+Make a file called README.md, with these contents:
@@ -1,2 +1,2 @@
+text editor in the terminal for you to use to edit your commit message.
+This lets you write a longer commit message with more details.
+By default, Git uses the `vi` text editor, which is extremely difficult
-+to use if you're not used to it.
++to use if you're not used to it. On Windows, the Git installer asks you
++to set your text editor during the install to avoid this problem.
+
+Some signs that you're trapped in `vi`: suddenly typing doesn't work
-+anymore, and there are tilde `~` characters on the left of the screen.
++anymore, and there are tilde `~` characters on the bottom left of the
++screen.
+
+If Git opens `vi` and you'd rather use a different editor, you can
+handle it like this:
+
-+1. Quit by typing `Escape`, then `:q!` and then `Enter`
++1. Quit by pressing the `Escape` key, then typing `:q!` and then `Enter`
+2. Run `git config --global core.editor YOUR_PREFERRED_EDITOR`
+ to configure which editor to use. For example, `nano` is available
+ on a lot of systems and has basic instructions on the screen for how
-+ to use it.
++ to use it. Here is a list of
++ https://git-scm.com/book/en/v2/Appendix-C:-Git-Commands-Setup-and-Config#ch_core_editor[how to configure some common editors].
+3. Run `git commit` again
+
+If you don't want to set up a text editor yet, you can also just use
@@ -1,2 +1,2 @@
+a Git repository on the internet, like connecting through SSH or open
+source Git forge software to your server.
+
-+Step 10: Create an SSH key (if needed)
-+--------------------------------------
-+
++Step 10 (Mac/Linux only): Create an SSH key if needed
++-----------------------------------------------------
+For Git to upload changes to another Git repository, it needs a way to
+login to that repository. One of the most popular ways to do this is
+with an SSH key.
+
-+If you don't already have an SSH key, you'll need to create one. On Mac
-+or Linux, you can check if you already have an SSH key by running:
++On Windows, you can skip this step and the next one because Git for
++Windows comes with
++https://github.com/git-ecosystem/git-credential-manager[Git Credential Manager]
++to handle logging in.
++
++If you don't already have an SSH key, you'll need to create one.
++You can check if you already have an SSH key by running:
+
+-------------------------------------------
+$ ls ~/.ssh/*.pub
@@ -1,2 +1,2 @@
+security team in your organization, they might have very different
+opinions about the appropriate way to configure authentication with Git.
+
-+Step 11: Tell the Git host your SSH public key
-+----------------------------------------------
++Step 11 (Mac/Linux only): Tell the Git host your SSH public key
++---------------------------------------------------------------
+
-+First, find your SSH key like this (on Mac or Linux):
++First, find your SSH key like this:
+
+-------------------------------------------
+$ ls ~/.ssh/*.pub
@@ -1,2 +1,2 @@
+Step 13: Find the address of the repository
+-------------------------------------------
+
-+Now, find the address of the repository on your Git host. It should look
-+something like this:
++Now, find the address of the repository on your Git host.
++
++If you followed the Mac/Linux instructions to set up an SSH key, look
++for an "SSH" address like this:
+
+-------------------------------------------
+git@git.example.com:username/repo.git
+-------------------------------------------
+
++If you're on Windows, look for an "HTTPS" address like this:
++
++-------------------------------------------
++https://git.example.com/username/repo.git
++-------------------------------------------
++
+(where `example.com`, `username` and `repo` will be replaced with the
+actual values).
+
-+If you can only find an address starting with `https://`, then
-+you can often translate it to the SSH format by replacing `https://`
-+with `git@` and replacing the `/` after the domain name with an `:`.
-+Here's how:
++If you can only find an address starting with `https://` and you need
++an SSH address then you can often translate it to the SSH format by
++replacing `https://` with `git@` and replacing the `/` after the domain
++name with an `:`. Here's how:
+
+-------------------------------------------
+https://git.example.com/username/repo
@@ -1,2 +1,2 @@
+
+First, tell Git about the other repository by running `git remote add`
+in your terminal
-+(replace `git@example.com:username/repo.git` with the actual address):
++(replace `git@example.com:username/repo.git` with the address from Step 13):
+
+-------------------------------------------
+$ git remote add origin git@example.com:username/repo.git
@@ -1,2 +1,2 @@
+$ git push --set-upstream origin main
+-------------------------------------------
+
++On Windows, this should pop up a dialog from Git Credential Manager
++asking you to log in to the Git host in your browser.
++
+Let's break down this `git push` command:
+
+* `origin` refers to the Git repository that we just added with
--
gitgitgadget
next prev parent reply other threads:[~2026-10-28 14:44 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 19:37 [PATCH 0/2] WIP: doc: add new git tutorial Julia Evans via GitGitGadget
2026-10-06 19:37 ` [PATCH 1/2] doc: remove gittutorial Julia Evans via GitGitGadget
2026-10-06 19:37 ` [PATCH 2/2] doc: add new Git tutorial for beginners Julia Evans via GitGitGadget
2026-10-07 19:48 ` D. Ben Knoble
2026-10-19 14:24 ` Julia Evans
2026-10-19 16:49 ` Ben Knoble
2026-10-19 20:42 ` Julia Evans
2026-10-19 21:14 ` D. Ben Knoble
2026-10-20 17:11 ` Junio C Hamano
2026-10-20 17:59 ` Julia Evans
2026-10-20 18:26 ` Junio C Hamano
2026-10-20 18:27 ` Junio C Hamano
2026-10-20 18:45 ` Junio C Hamano
2026-10-20 19:13 ` Junio C Hamano
2026-10-21 17:16 ` Junio C Hamano
2026-10-21 21:24 ` Julia Evans
2026-10-20 18:22 ` Julia Evans
2026-10-20 18:30 ` Junio C Hamano
2026-10-26 16:03 ` Richard Kerry
2026-10-26 19:14 ` Julia Evans
2026-10-26 20:03 ` Julia Evans
2026-10-26 20:17 ` Junio C Hamano
2026-10-26 20:22 ` Julia Evans
2026-10-26 20:54 ` Junio C Hamano
2026-10-07 19:26 ` [PATCH 0/2] WIP: doc: add new git tutorial D. Ben Knoble
2026-10-19 14:55 ` [PATCH v2 0/2] " Julia Evans via GitGitGadget
2026-10-19 14:55 ` [PATCH v2 1/2] doc: remove gittutorial Julia Evans via GitGitGadget
2026-10-19 14:55 ` [PATCH v2 2/2] doc: add new Git tutorial for beginners Julia Evans via GitGitGadget
2026-10-20 1:24 ` [PATCH v2 0/2] doc: add new git tutorial Junio C Hamano
2026-10-20 2:24 ` Ben Knoble
2026-10-20 12:18 ` Julia Evans
2026-10-20 18:50 ` Tuomas Ahola
2026-10-20 19:13 ` Junio C Hamano
2026-10-23 15:17 ` [PATCH v3 " Julia Evans via GitGitGadget
2026-10-23 15:17 ` [PATCH v3 1/2] doc: remove gittutorial Julia Evans via GitGitGadget
2026-10-23 15:17 ` [PATCH v3 2/2] doc: add new Git tutorial for beginners Julia Evans via GitGitGadget
2026-10-23 18:01 ` [PATCH v3 0/2] doc: add new git tutorial Ben Knoble
2026-10-27 14:30 ` Julia Evans
2026-10-27 15:19 ` Ben Knoble
2026-10-27 18:31 ` Julia Evans
2026-10-28 14:44 ` Julia Evans via GitGitGadget [this message]
2026-10-28 14:44 ` [PATCH v4 1/2] doc: remove gittutorial Julia Evans via GitGitGadget
2026-10-28 18:01 ` Junio C Hamano
2026-10-28 14:44 ` [PATCH v4 2/2] doc: add new Git tutorial for beginners Julia Evans via GitGitGadget
2026-10-28 17:26 ` Junio C Hamano
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=pull.2248.v4.git.1793198687.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=julia@jvns.ca \
--cc=richard.kerry@atos.ai \
--cc=taahol@utu.fi \
/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