1GIT-FAST-EXPORT(1) Git Manual GIT-FAST-EXPORT(1)
2
3
4
6 git-fast-export - Git data exporter
7
9 git fast-export [options] | git fast-import
10
11
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
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 [<git-rev-list-args>...]
98 A list of arguments, acceptable to git rev-parse and git rev-list,
99 that specifies the specific objects and references to export. For
100 example, master~10..master causes the current master reference to
101 be exported along with all objects added since its 10th ancestor
102 commit.
103
105 $ git fast-export --all | (cd /empty/repository && git fast-import)
106
107
108 This will export the whole repository and import it into the existing
109 empty repository. Except for reencoding commits that are not in UTF-8,
110 it would be a one-to-one mirror.
111
112 $ git fast-export master~5..master |
113 sed "s|refs/heads/master|refs/heads/other|" |
114 git fast-import
115
116
117 This makes a new branch called other from master~5..master (i.e. if
118 master has linear history, it will take the last 5 commits).
119
120 Note that this assumes that none of the blobs and commit messages
121 referenced by that revision range contains the string
122 refs/heads/master.
123
125 Since git fast-import cannot tag trees, you will not be able to export
126 the linux-2.6.git repository completely, as it contains a tag
127 referencing a tree instead of a commit.
128
130 Part of the git(1) suite
131
132
133
134Git 1.8.3.1 11/19/2018 GIT-FAST-EXPORT(1)