6 git-add - Add file contents to the changeset to be committed next
10 'git-add' [-n] [-v] [--] <file>...
14 All the changed file contents to be committed together in a single set
15 of changes must be "added" with the 'add' command before using the
16 'commit' command. This is not only for adding new files. Even modified
17 files must be added to the set of changes about to be committed.
19 This command can be performed multiple times before a commit. The added
20 content corresponds to the state of specified file(s) at the time the
21 'add' command is used. This means the 'commit' command will not consider
22 subsequent changes to already added content if it is not added again before
25 The 'git status' command can be used to obtain a summary of what is included
28 This command only adds non-ignored files, to add ignored files use
29 "git update-index --add".
31 Please see gitlink:git-commit[1] for alternative ways to add content to a
38 Files to add content from.
41 Don't actually add the file(s), just show if they exist.
47 This option can be used to separate command-line options from
48 the list of files, (useful when filenames might be mistaken
49 for command-line options).
54 git-add Documentation/\\*.txt::
56 Adds content from all `\*.txt` files under `Documentation`
57 directory and its subdirectories.
59 Note that the asterisk `\*` is quoted from the shell in this
60 example; this lets the command to include the files from
61 subdirectories of `Documentation/` directory.
65 Considers adding content from all git-*.sh scripts.
66 Because this example lets shell expand the asterisk
67 (i.e. you are listing the files explicitly), it does not
68 consider `subdir/git-foo.sh`.
76 gitlink:git-update-index[1]
80 Written by Linus Torvalds <torvalds@osdl.org>
84 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
88 Part of the gitlink:git[7] suite