blob: 75b06f33e73497fbb8916ef02d70ca59f4aab2f6 [file] [log] [blame]
Junio C Hamano0c999702007-12-03 09:57:551git-fast-export(1)
2==================
3
4NAME
5----
6git-fast-export - Git data exporter
7
8
9SYNOPSIS
10--------
Junio C Hamanofce7c7e2008-07-02 03:06:3811'git fast-export [options]' | 'git fast-import'
Junio C Hamano0c999702007-12-03 09:57:5512
13DESCRIPTION
14-----------
15This program dumps the given revisions in a form suitable to be piped
Junio C Hamanoba4b9282008-07-06 05:20:3116into 'git-fast-import'.
Junio C Hamano0c999702007-12-03 09:57:5517
Junio C Hamanoec87f522008-12-10 08:35:2518You can use it as a human-readable bundle replacement (see
Junio C Hamano35738e82008-01-07 07:55:4619linkgit:git-bundle[1]), or as a kind of an interactive
Junio C Hamanoba4b9282008-07-06 05:20:3120'git-filter-branch'.
Junio C Hamano0c999702007-12-03 09:57:5521
22
23OPTIONS
24-------
25--progress=<n>::
26Insert 'progress' statements every <n> objects, to be shown by
Junio C Hamanoba4b9282008-07-06 05:20:3127'git-fast-import' during import.
Junio C Hamano0c999702007-12-03 09:57:5528
Junio C Hamano58256872007-12-04 08:31:1329--signed-tags=(verbatim|warn|strip|abort)::
Junio C Hamano0c999702007-12-03 09:57:5530Specify how to handle signed tags. Since any transformation
31after the export can change the tag names (which can also happen
32when excluding revisions) the signatures will not match.
33+
34When asking to 'abort' (which is the default), this program will die
35when encountering a signed tag. With 'strip', the tags will be made
Junio C Hamano58256872007-12-04 08:31:1336unsigned, with 'verbatim', they will be silently exported
Junio C Hamano0c999702007-12-03 09:57:5537and with 'warn', they will be exported, but you will see a warning.
38
Junio C Hamanoceec6ab2009-07-26 21:37:5239--tag-of-filtered-object=(abort|drop|rewrite)::
40Specify how to handle tags whose tagged objectis filtered out.
41Since revisions and files to export can be limited by path,
42tagged objects may be filtered completely.
43+
44When asking to 'abort' (which is the default), this program will die
45when encountering such a tag. With 'drop' it will omit such tags from
46the output. With 'rewrite', if the tagged object is a commit, it will
47rewrite the tag to tag an ancestor commit (via parent rewriting; see
48linkgit:git-rev-list[1])
49
Junio C Hamano7f80ae82008-07-30 18:31:3550-M::
51-C::
52Perform move and/or copy detection, as described in the
53linkgit:git-diff[1] manual page, and use it to generate
54rename and copy commands in the output dump.
55+
56Note that earlier versions of this command did not complain and
57produced incorrect results if you gave these options.
58
Junio C Hamano4224f992008-06-23 07:14:0859--export-marks=<file>::
60Dumps the internal marks table to <file> when complete.
61Marks are written one per line as `:markid SHA-1`. Only marks
62for revisions are dumped; marks for blobs are ignored.
63Backends can use this file to validate imports after they
64have been completed, or to save the marks table across
65incremental runs. As <file> is only opened and truncated
66at completion, the same path can also be safely given to
67\--import-marks.
68
69--import-marks=<file>::
70Before processing any input, load the marks specified in
71<file>. The input file must exist, must be readable, and
72must use the same format as produced by \--export-marks.
73+
74Any commits that have already been marked will not be exported again.
75If the backend uses a similar \--import-marks file, this allows for
76incremental bidirectional exporting of the repository by keeping the
77marks the same across runs.
78
Junio C Hamano54bf1e22008-12-20 06:30:1179--fake-missing-tagger::
80Some old repositories have tags without a tagger. The
81fast-import protocol was pretty strict about that, and did not
82allow that. So fake a tagger to be able to fast-import the
83output.
84
Junio C Hamanobacccda2009-08-03 08:07:1285--no-data::
86Skip output of blob objects and instead refer to blobs via
87their original SHA-1 hash. This is useful when rewriting the
88directory structure or history of a repository without
89touching the contents of individual files. Note that the
90resulting stream can only be used by a repository which
91already contains the necessary objects.
92
Junio C Hamanoceec6ab2009-07-26 21:37:5293[git-rev-list-args...]::
94 A list of arguments, acceptable to 'git-rev-parse' and
95 'git-rev-list', that specifies the specific objects and references
96 to export. For example, `master\~10..master` causes the
97 current master reference to be exported along with all objects
98 added since its 10th ancestor commit.
Junio C Hamano0c999702007-12-03 09:57:5599
100EXAMPLES
101--------
102
103-------------------------------------------------------------------
104$ git fast-export --all | (cd /empty/repository && git fast-import)
105-------------------------------------------------------------------
106
107This will export the whole repository and import it into the existing
108empty repository. Except for reencoding commits that are not in
109UTF-8, it would be a one-to-one mirror.
110
111-----------------------------------------------------
112$ git fast-export master~5..master |
113sed "s|refs/heads/master|refs/heads/other|" |
114git fast-import
115-----------------------------------------------------
116
117This makes a new branch called 'other' from 'master~5..master'
118(i.e. if 'master' has linear history, it will take the last 5 commits).
119
120Note that this assumes that none of the blobs and commit messages
121referenced by that revision range contains the string
122'refs/heads/master'.
123
124
125Limitations
126-----------
127
Junio C Hamanoba4b9282008-07-06 05:20:31128Since 'git-fast-import' cannot tag trees, you will not be
Junio C Hamano0c999702007-12-03 09:57:55129able to export the linux-2.6.git repository completely, as it contains
130a tag referencing a tree instead of a commit.
131
132
133Author
134------
135Written by Johannes E. Schindelin <johannes.schindelin@gmx.de>.
136
137Documentation
138--------------
139Documentation by Johannes E. Schindelin <johannes.schindelin@gmx.de>.
140
141GIT
142---
Junio C Hamanof7c042d2008-06-06 22:50:53143Part of the linkgit:git[1] suite