File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ You can also add only part of your changes to a file with `git add -p`.
26
26
Please see linkgit:git-commit[1] for alternative ways to add content to
27
27
a commit.
28
28
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.
33
32
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.
36
36
37
37
`git add` will not add ignored files by default. You can use the
38
38
`--force` option to add ignored files. If you explicitly specify the
@@ -443,6 +443,7 @@ linkgit:git-rm[1]
443
443
linkgit:git-reset[1]
444
444
linkgit:git-mv[1]
445
445
linkgit:git-commit[1]
446
+ linkgit:git-diff[1]
446
447
linkgit:git-update-index[1]
447
448
448
449
GIT
You can’t perform that action at this time.
0 commit comments