6 git-add - Add files to the index file.
10 'git-add' [-n] [-v] <file>...
14 A simple wrapper for git-update-index to add files to the index,
15 for people used to do "cvs add".
21 Files to add to the index.
24 Don't actually add the file(s), just show if they exist.
33 The list of <file> given to the command is fed to `git-ls-files`
34 command to list files that are not registered in the index and
35 are not ignored/excluded by `$GIT_DIR/info/exclude` file or
36 `.gitignore` file in each directory. This means two things:
38 . You can put the name of a directory on the command line, and
39 the command will add all files in it and its subdirectories;
41 . Giving the name of a file that is already in index does not
42 run `git-update-index` on that path.
47 git-add Documentation/\\*.txt::
49 Adds all `\*.txt` files that are not in the index under
50 `Documentation` directory and its subdirectories.
52 Note that the asterisk `\*` is quoted from the shell in this
53 example; this lets the command to include the files from
54 subdirectories of `Documentation/` directory.
58 Adds all git-*.sh scripts that are not in the index.
59 Because this example lets shell expand the asterisk
60 (i.e. you are listing the files explicitly), it does not
61 add `subdir/git-foo.sh` to the index.
66 Written by Linus Torvalds <torvalds@osdl.org>
70 Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
74 Part of the gitlink:git[7] suite