From: "Julia Evans via GitGitGadget" <gitgitgadget@gmail•com>
To: git@vger•kernel.org
Cc: "Chris Torek" <chris.torek@gmail•com>,
"D. Ben Knoble" <ben.knoble@gmail•com>,
"Jean-Noël AVILA" <jn.avila@free•fr>,
"Julia Evans" <julia@jvns•ca>, "Julia Evans" <julia@jvns•ca>
Subject: [PATCH v2 3/4] doc: git-add: make explanation less dry
Date: Wed, 13 Aug 2025 23:20:17 +0000 [thread overview]
Message-ID: <ce1eafb02860b390da9359f92fcf098b7cdd3a94.1755127218.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.1952.v2.git.1755127218.gitgitgadget@gmail.com>
From: Julia Evans <julia@jvns•ca>
- use examples
- mention `git diff --staged`
- link to git diff man page
Signed-off-by: Julia Evans <julia@jvns•ca>
---
Documentation/git-add.adoc | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-add.adoc b/Documentation/git-add.adoc
index 75e223f6b1ea..6a6f5223419f 100644
--- a/Documentation/git-add.adoc
+++ b/Documentation/git-add.adoc
@@ -31,13 +31,13 @@ You can also add only part of your changes to a file with `git add -p`.
Please see linkgit:git-commit[1] for alternative ways to add content to
a commit.
-This command can be performed multiple times before a commit. It only
-adds the content of the specified file(s) at the time the add command is
-run; if you want subsequent changes included in the next commit, then
-you must run `git add` again to add the new content to the index.
+The `git add` command only adds the changes at the time that you run it.
+If you edit `file.c` after adding it, you need to run `git add file.c`
+again before committing.
-The `git status` command can be used to obtain a summary of which
-files have changes that are staged for the next commit.
+If you want to check which changes have been added, you can run
+`git status` to print out a summary of the changes that will be committed
+or run `git diff --staged` to see the full diff.
`git add` will not add ignored files by default. You can use the
`--force` option to add ignored files. If you explicitly specify the
@@ -448,6 +448,7 @@ linkgit:git-rm[1]
linkgit:git-reset[1]
linkgit:git-mv[1]
linkgit:git-commit[1]
+linkgit:git-diff[1]
linkgit:git-update-index[1]
GIT
--
gitgitgadget
next prev parent reply other threads:[~2025-08-13 23:20 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 20:07 [PATCH 0/5] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-12 20:07 ` [PATCH 1/5] doc: git-add: remove options from SYNOPSIS Julia Evans via GitGitGadget
2025-08-12 20:41 ` Junio C Hamano
2025-08-13 16:58 ` Julia Evans
2025-08-13 20:47 ` Jean-Noël AVILA
2025-08-12 20:07 ` [PATCH 2/5] doc: git-add: start man page with an example Julia Evans via GitGitGadget
2025-08-12 21:01 ` Junio C Hamano
2025-08-12 21:40 ` Julia Evans
2025-08-12 22:12 ` Junio C Hamano
2025-08-12 22:45 ` Julia Evans
2025-08-13 17:22 ` D. Ben Knoble
2025-08-14 0:41 ` Junio C Hamano
2025-08-14 2:59 ` Julia Evans
2025-08-15 5:38 ` Junio C Hamano
2025-08-12 20:07 ` [PATCH 3/5] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-13 17:24 ` D. Ben Knoble
2025-08-12 20:07 ` [PATCH 4/5] doc: git-add: make explanation less dry Julia Evans via GitGitGadget
2025-08-12 20:07 ` [PATCH 5/5] doc: git-add: explain inconsistent terminology Julia Evans via GitGitGadget
2025-08-12 20:51 ` Chris Torek
2025-08-12 21:36 ` Junio C Hamano
2025-08-12 21:43 ` Julia Evans
2025-08-13 23:20 ` [PATCH v2 0/4] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-13 23:20 ` [PATCH v2 1/4] doc: git-add: start man page with an example Julia Evans via GitGitGadget
2025-08-15 0:38 ` Junio C Hamano
2025-08-15 13:34 ` Jean-Noël AVILA
2025-08-15 16:33 ` Junio C Hamano
2025-08-17 18:37 ` Jean-Noël AVILA
2025-08-19 20:01 ` Julia Evans
2025-08-13 23:20 ` [PATCH v2 2/4] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-14 0:59 ` D. Ben Knoble
2025-08-14 22:10 ` Junio C Hamano
2025-08-13 23:20 ` Julia Evans via GitGitGadget [this message]
2025-08-14 22:22 ` [PATCH v2 3/4] doc: git-add: make explanation less dry Junio C Hamano
2025-08-15 16:10 ` Julia Evans
2025-08-15 18:25 ` D. Ben Knoble
2025-08-15 20:01 ` Junio C Hamano
2025-08-16 14:15 ` D. Ben Knoble
2025-08-15 19:47 ` Junio C Hamano
2025-08-19 12:57 ` Julia Evans
2025-08-21 20:36 ` Jean-Noël AVILA
2025-08-13 23:20 ` [PATCH v2 4/4] doc: git-add: explain inconsistent terminology Julia Evans via GitGitGadget
2025-08-14 22:49 ` Junio C Hamano
2025-08-19 20:09 ` Julia Evans
2025-08-19 20:46 ` [PATCH v3 0/3] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-19 20:46 ` [PATCH v3 1/3] Git 2.51 Junio C Hamano via GitGitGadget
2025-08-19 21:06 ` rsbecker
2025-08-19 21:37 ` Junio C Hamano
2025-08-19 21:44 ` D. Ben Knoble
2025-08-19 21:48 ` Julia Evans
2025-08-19 21:49 ` rsbecker
2025-08-19 20:46 ` [PATCH v3 2/3] doc: git-add: clarify intro & add an example Julia Evans via GitGitGadget
2025-08-21 20:08 ` Junio C Hamano
2025-08-22 20:37 ` Julia Evans
2025-08-19 20:46 ` [PATCH v3 3/3] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-21 20:09 ` Junio C Hamano
2025-08-29 11:55 ` [PATCH v4 0/2] doc: git-add: clarify DESCRIPTION section Julia Evans via GitGitGadget
2025-08-29 11:55 ` [PATCH v4 1/2] doc: git-add: clarify intro & add an example Julia Evans via GitGitGadget
2025-08-29 11:55 ` [PATCH v4 2/2] doc: git-add: simplify discussion of ignored files Julia Evans via GitGitGadget
2025-08-29 17:11 ` [PATCH v4 0/2] doc: git-add: clarify DESCRIPTION section 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=ce1eafb02860b390da9359f92fcf098b7cdd3a94.1755127218.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail$(echo .)com \
--cc=ben.knoble@gmail$(echo .)com \
--cc=chris.torek@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jn.avila@free$(echo .)fr \
--cc=julia@jvns$(echo .)ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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