1GIT-FAST-EXPORT(1)                Git Manual                GIT-FAST-EXPORT(1)
2
3
4

NAME

6       git-fast-export - Git data exporter
7

SYNOPSIS

9       git fast-export [<options>] | git fast-import
10
11

DESCRIPTION

13       This program dumps the given revisions in a form suitable to be piped
14       into git fast-import.
15
16       You can use it as a human-readable bundle replacement (see git-
17       bundle(1)), or as a kind of an interactive git filter-branch.
18

OPTIONS

20       --progress=<n>
21           Insert progress statements every <n> objects, to be shown by git
22           fast-import during import.
23
24       --signed-tags=(verbatim|warn|warn-strip|strip|abort)
25           Specify how to handle signed tags. Since any transformation after
26           the export can change the tag names (which can also happen when
27           excluding revisions) the signatures will not match.
28
29           When asking to abort (which is the default), this program will die
30           when encountering a signed tag. With strip, the tags will silently
31           be made unsigned, with warn-strip they will be made unsigned but a
32           warning will be displayed, with verbatim, they will be silently
33           exported and with warn, they will be exported, but you will see a
34           warning.
35
36       --tag-of-filtered-object=(abort|drop|rewrite)
37           Specify how to handle tags whose tagged object is filtered out.
38           Since revisions and files to export can be limited by path, tagged
39           objects may be filtered completely.
40
41           When asking to abort (which is the default), this program will die
42           when encountering such a tag. With drop it will omit such tags from
43           the output. With rewrite, if the tagged object is a commit, it will
44           rewrite the tag to tag an ancestor commit (via parent rewriting;
45           see git-rev-list(1))
46
47       -M, -C
48           Perform move and/or copy detection, as described in the git-diff(1)
49           manual page, and use it to generate rename and copy commands in the
50           output dump.
51
52           Note that earlier versions of this command did not complain and
53           produced incorrect results if you gave these options.
54
55       --export-marks=<file>
56           Dumps the internal marks table to <file> when complete. Marks are
57           written one per line as :markid SHA-1. Only marks for revisions are
58           dumped; marks for blobs are ignored. Backends can use this file to
59           validate imports after they have been completed, or to save the
60           marks table across incremental runs. As <file> is only opened and
61           truncated at completion, the same path can also be safely given to
62           --import-marks. The file will not be written if no new object has
63           been marked/exported.
64
65       --import-marks=<file>
66           Before processing any input, load the marks specified in <file>.
67           The input file must exist, must be readable, and must use the same
68           format as produced by --export-marks.
69
70           Any commits that have already been marked will not be exported
71           again. If the backend uses a similar --import-marks file, this
72           allows for incremental bidirectional exporting of the repository by
73           keeping the marks the same across runs.
74
75       --fake-missing-tagger
76           Some old repositories have tags without a tagger. The fast-import
77           protocol was pretty strict about that, and did not allow that. So
78           fake a tagger to be able to fast-import the output.
79
80       --use-done-feature
81           Start the stream with a feature done stanza, and terminate it with
82           a done command.
83
84       --no-data
85           Skip output of blob objects and instead refer to blobs via their
86           original SHA-1 hash. This is useful when rewriting the directory
87           structure or history of a repository without touching the contents
88           of individual files. Note that the resulting stream can only be
89           used by a repository which already contains the necessary objects.
90
91       --full-tree
92           This option will cause fast-export to issue a "deleteall" directive
93           for each commit followed by a full list of all files in the commit
94           (as opposed to just listing the files which are different from the
95           commit’s first parent).
96
97       --anonymize
98           Anonymize the contents of the repository while still retaining the
99           shape of the history and stored tree. See the section on
100           ANONYMIZING below.
101
102       --refspec
103           Apply the specified refspec to each ref exported. Multiple of them
104           can be specified.
105
106       [<git-rev-list-args>...]
107           A list of arguments, acceptable to git rev-parse and git rev-list,
108           that specifies the specific objects and references to export. For
109           example, master~10..master causes the current master reference to
110           be exported along with all objects added since its 10th ancestor
111           commit.
112

EXAMPLES

114           $ git fast-export --all | (cd /empty/repository && git fast-import)
115
116
117       This will export the whole repository and import it into the existing
118       empty repository. Except for reencoding commits that are not in UTF-8,
119       it would be a one-to-one mirror.
120
121           $ git fast-export master~5..master |
122                   sed "s|refs/heads/master|refs/heads/other|" |
123                   git fast-import
124
125
126       This makes a new branch called other from master~5..master (i.e. if
127       master has linear history, it will take the last 5 commits).
128
129       Note that this assumes that none of the blobs and commit messages
130       referenced by that revision range contains the string
131       refs/heads/master.
132

ANONYMIZING

134       If the --anonymize option is given, git will attempt to remove all
135       identifying information from the repository while still retaining
136       enough of the original tree and history patterns to reproduce some
137       bugs. The goal is that a git bug which is found on a private repository
138       will persist in the anonymized repository, and the latter can be shared
139       with git developers to help solve the bug.
140
141       With this option, git will replace all refnames, paths, blob contents,
142       commit and tag messages, names, and email addresses in the output with
143       anonymized data. Two instances of the same string will be replaced
144       equivalently (e.g., two commits with the same author will have the same
145       anonymized author in the output, but bear no resemblance to the
146       original author string). The relationship between commits, branches,
147       and tags is retained, as well as the commit timestamps (but the commit
148       messages and refnames bear no resemblance to the originals). The
149       relative makeup of the tree is retained (e.g., if you have a root tree
150       with 10 files and 3 trees, so will the output), but their names and the
151       contents of the files will be replaced.
152
153       If you think you have found a git bug, you can start by exporting an
154       anonymized stream of the whole repository:
155
156           $ git fast-export --anonymize --all >anon-stream
157
158
159       Then confirm that the bug persists in a repository created from that
160       stream (many bugs will not, as they really do depend on the exact
161       repository contents):
162
163           $ git init anon-repo
164           $ cd anon-repo
165           $ git fast-import <../anon-stream
166           $ ... test your bug ...
167
168
169       If the anonymized repository shows the bug, it may be worth sharing
170       anon-stream along with a regular bug report. Note that the anonymized
171       stream compresses very well, so gzipping it is encouraged. If you want
172       to examine the stream to see that it does not contain any private data,
173       you can peruse it directly before sending. You may also want to try:
174
175           $ perl -pe 's/\d+/X/g' <anon-stream | sort -u | less
176
177
178       which shows all of the unique lines (with numbers converted to "X", to
179       collapse "User 0", "User 1", etc into "User X"). This produces a much
180       smaller output, and it is usually easy to quickly confirm that there is
181       no private data in the stream.
182

LIMITATIONS

184       Since git fast-import cannot tag trees, you will not be able to export
185       the linux.git repository completely, as it contains a tag referencing a
186       tree instead of a commit.
187

SEE ALSO

189       git-fast-import(1)
190

GIT

192       Part of the git(1) suite
193
194
195
196Git 2.18.1                        05/14/2019                GIT-FAST-EXPORT(1)
Impressum