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