1CG-ADD(1)                                                            CG-ADD(1)
2
3
4

NAME

6       cg-add - add new files to the repository
7

SYNOPSIS

9       cg-add [-a] [-N] [-r] FILE...
10
11

DESCRIPTION

13       Takes a list of file names at the command line, and schedules them for
14       addition to the GIT repository at the next commit. Those files are
15       denoted by A in the cg-status(1) list. You can add cg-rm(1)oved files
16       to undo the removal (use cg-restore(1) if the file is already deleted
17       from the working copy as well); you can undo additions in an analogous
18       way using cg-rm(1).
19
20       The command will fail if one of the given files does not exist.
21
22       Note that directories never have to be added to the repository, and are
23       not tracked on their own. That means, you cannot currently add an empty
24       directory to Cogito. The reason for this is that Cogito manages content
25       and empty directories have no content. Directories are added
26       automatically when adding files inside them, or you can add all files
27       in a directory using cg-add -r.
28
29

OPTIONS

31       -a     Add all files in the repository that are currently untracked.
32              Useful when there were some random files added/removed (e.g. by
33              some third-party application) and you want to get the repository
34              in sync: just use cg-rm -a && cg-add -a. Note that contrary to
35              cg-add -r ., this will not re-add cg-rm(1)oved files.
36
37       -N     Only update the cache: do not copy the data into the object
38              database. This is for special purposes when you might not
39              actually _have_ any object database. This option is normally not
40              interesting.
41
42       -r     If you pass cg-add this flag and any directory names, it will
43              try to add files in those directories recursively (with regard
44              to your ignore rules - see cg-status(1) for a more detailed
45              description of those). See also above for more notes about
46              cg-add vs. directories.
47
48       -h, --help
49              Print usage summary.
50
51       --long-help
52              Print user manual. The same as found in cg-add(1).
53
55       Copyright © Petr Baudis, 2005
56
57

SEE ALSO

59       cg-add is part of cogito(7), a toolkit for managing git(7) trees.
60
61
62
63
64                                  12/11/2006                         CG-ADD(1)
Impressum