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 @@ -31,13 +31,13 @@ You can also add only part of your changes to a file with `git add -p`.
31
31
Please see linkgit:git-commit[1] for alternative ways to add content to
32
32
a commit.
33
33
34
- This command can be performed multiple times before a commit. It only
35
- adds the content of the specified file(s) at the time the add command is
36
- run; if you want subsequent changes included in the next commit, then
37
- you must run `git add` again to add the new content to the index.
34
+ `git add` only adds the changes at the time that you run it. If you edit
35
+ `file.c` after adding it, you need to run `git add file.c` again before
36
+ committing.
38
37
39
- The `git status` command can be used to obtain a summary of which
40
- files have changes that are staged for the next commit.
38
+ If you want to check which changes have been added, you can run
39
+ `git status` to print out a summary of the changes that will be committed
40
+ or run `git diff --staged` to see the full diff.
41
41
42
42
`git add` will not add ignored files by default. You can use the
43
43
`--force` option to add ignored files. If you explicitly specify the
@@ -448,6 +448,7 @@ linkgit:git-rm[1]
448
448
linkgit:git-reset[1]
449
449
linkgit:git-mv[1]
450
450
linkgit:git-commit[1]
451
+ linkgit:git-diff[1]
451
452
linkgit:git-update-index[1]
452
453
453
454
GIT
You can’t perform that action at this time.
0 commit comments