Commit | Line | Data |
---|---|---|
d5ae2173 YD |
1 | stg-cp(1) |
2 | ========= | |
3 | Yann Dirson <ydirson@altern.org> | |
4 | v0.13, March 2007 | |
5 | ||
6 | NAME | |
7 | ---- | |
8 | stg-cp - stgdesc:cp[] | |
9 | ||
10 | SYNOPSIS | |
11 | -------- | |
12 | stg cp [OPTIONS] <file|dir> <newname> | |
13 | ||
14 | stg cp [OPTIONS] <files|dirs...> <dir> | |
15 | ||
16 | DESCRIPTION | |
17 | ----------- | |
18 | ||
19 | Make git-controlled copies of git-controlled files. The copies are | |
20 | added to the Git index, so you can add them to a patch with | |
21 | stglink:refresh[]. | |
22 | ||
23 | In the first form, copy a single file or a single directory, with a | |
24 | new name. The parent directory of <newname> must already exist; | |
25 | <newname> itself must not already exist, or the command will be | |
26 | interpreted as one of the second form. | |
27 | ||
28 | In the second form, copy one or several files and/or directories, into | |
29 | an existing directory. | |
30 | ||
31 | Directories are copied recursively. Only the git-controlled files | |
32 | under the named directories are copied and added to the index. Any | |
33 | file not known to Git will not be copied. | |
34 | ||
35 | CAVEATS | |
36 | ------- | |
37 | ||
38 | The first form doesn't allow yet to overwrite an existing file | |
39 | (whether it could be recovered from Git or not), and the second form | |
40 | does not check before overwriting any file, possibly leading to loss | |
41 | of non-committed modifications. | |
42 | ||
43 | FUTURE OPTIONS | |
44 | -------------- | |
45 | ||
46 | --all:: | |
47 | Also copy files not known to Git when copying a directory. | |
48 | ||
49 | --force:: | |
50 | Force overwriting of target files, even if overwritten files | |
51 | have non-committed changes or are not known to Git. | |
52 | ||
53 | --dry-run:: | |
54 | Show which files would be added, and which would be modified | |
55 | if --force would be added. | |
56 | ||
57 | StGIT | |
58 | ----- | |
59 | Part of the StGIT suite - see gitlink:stg[7]. |