Skip to content

Commit 54d36b3

Browse files
committed
doc: git-add: make explanation less dry
- use examples - mention `git diff --staged` - link to git diff man page
1 parent a844a8f commit 54d36b3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Documentation/git-add.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ You can also add only part of your changes to a file with `git add -p`.
2626
Please see linkgit:git-commit[1] for alternative ways to add content to
2727
a commit.
2828

29-
This command can be performed multiple times before a commit. It only
30-
adds the content of the specified file(s) at the time the add command is
31-
run; if you want subsequent changes included in the next commit, then
32-
you must run `git add` again to add the new content to the index.
29+
`git add` only adds the changes at the time that you run it. If you edit
30+
`file.c` after adding it, you need to run `git add file.c` again before
31+
committing.
3332

34-
The `git status` command can be used to obtain a summary of which
35-
files have changes that are staged for the next commit.
33+
If you want to check which changes have been added, you can run `git
34+
status` to print out a summary of the changes that will be committed or
35+
run `git diff --staged` to see the full diff.
3636

3737
`git add` will not add ignored files by default. You can use the
3838
`--force` option to add ignored files. If you explicitly specify the
@@ -443,6 +443,7 @@ linkgit:git-rm[1]
443443
linkgit:git-reset[1]
444444
linkgit:git-mv[1]
445445
linkgit:git-commit[1]
446+
linkgit:git-diff[1]
446447
linkgit:git-update-index[1]
447448

448449
GIT

0 commit comments

Comments
 (0)