]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-fast-export.txt
Update draft release notes for 1.8.3
[thirdparty/git.git] / Documentation / git-fast-export.txt
CommitLineData
f2dc849e
JS
1git-fast-export(1)
2==================
3
4NAME
5----
6git-fast-export - Git data exporter
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
b1889c36 12'git fast-export [options]' | 'git fast-import'
f2dc849e
JS
13
14DESCRIPTION
15-----------
16This program dumps the given revisions in a form suitable to be piped
0b444cdb 17into 'git fast-import'.
f2dc849e 18
29b802aa 19You can use it as a human-readable bundle replacement (see
5162e697 20linkgit:git-bundle[1]), or as a kind of an interactive
0b444cdb 21'git filter-branch'.
f2dc849e
JS
22
23
24OPTIONS
25-------
26--progress=<n>::
27 Insert 'progress' statements every <n> objects, to be shown by
0b444cdb 28 'git fast-import' during import.
f2dc849e 29
cd16c59b 30--signed-tags=(verbatim|warn|warn-strip|strip|abort)::
f2dc849e
JS
31 Specify how to handle signed tags. Since any transformation
32 after the export can change the tag names (which can also happen
33 when excluding revisions) the signatures will not match.
34+
35When asking to 'abort' (which is the default), this program will die
cd16c59b
JK
36when encountering a signed tag. With 'strip', the tags will silently
37be made unsigned, with 'warn-strip' they will be made unsigned but a
38warning will be displayed, with 'verbatim', they will be silently
39exported and with 'warn', they will be exported, but you will see a
40warning.
f2dc849e 41
2d8ad469 42--tag-of-filtered-object=(abort|drop|rewrite)::
6a5d0b0a 43 Specify how to handle tags whose tagged object is filtered out.
2d8ad469
EN
44 Since revisions and files to export can be limited by path,
45 tagged objects may be filtered completely.
46+
47When asking to 'abort' (which is the default), this program will die
48when encountering such a tag. With 'drop' it will omit such tags from
49the output. With 'rewrite', if the tagged object is a commit, it will
50rewrite the tag to tag an ancestor commit (via parent rewriting; see
51linkgit:git-rev-list[1])
52
ae7c5dce
AG
53-M::
54-C::
55 Perform move and/or copy detection, as described in the
56 linkgit:git-diff[1] manual page, and use it to generate
57 rename and copy commands in the output dump.
58+
59Note that earlier versions of this command did not complain and
60produced incorrect results if you gave these options.
61
df6a7ff7
PB
62--export-marks=<file>::
63 Dumps the internal marks table to <file> when complete.
64 Marks are written one per line as `:markid SHA-1`. Only marks
65 for revisions are dumped; marks for blobs are ignored.
66 Backends can use this file to validate imports after they
67 have been completed, or to save the marks table across
68 incremental runs. As <file> is only opened and truncated
69 at completion, the same path can also be safely given to
70 \--import-marks.
c4458ecd
AP
71 The file will not be written if no new object has been
72 marked/exported.
df6a7ff7
PB
73
74--import-marks=<file>::
75 Before processing any input, load the marks specified in
76 <file>. The input file must exist, must be readable, and
77 must use the same format as produced by \--export-marks.
78+
79Any commits that have already been marked will not be exported again.
80If the backend uses a similar \--import-marks file, this allows for
81incremental bidirectional exporting of the repository by keeping the
82marks the same across runs.
83
4e46a8d6
JS
84--fake-missing-tagger::
85 Some old repositories have tags without a tagger. The
86 fast-import protocol was pretty strict about that, and did not
87 allow that. So fake a tagger to be able to fast-import the
88 output.
89
82670a5c
SR
90--use-done-feature::
91 Start the stream with a 'feature done' stanza, and terminate
92 it with a 'done' command.
93
79559f27
GI
94--no-data::
95 Skip output of blob objects and instead refer to blobs via
96 their original SHA-1 hash. This is useful when rewriting the
97 directory structure or history of a repository without
98 touching the contents of individual files. Note that the
99 resulting stream can only be used by a repository which
100 already contains the necessary objects.
101
7f40ab09
EN
102--full-tree::
103 This option will cause fast-export to issue a "deleteall"
104 directive for each commit followed by a full list of all files
105 in the commit (as opposed to just listing the files which are
106 different from the commit's first parent).
107
62b4698e 108[<git-rev-list-args>...]::
0b444cdb
TR
109 A list of arguments, acceptable to 'git rev-parse' and
110 'git rev-list', that specifies the specific objects and references
6cf378f0 111 to export. For example, `master~10..master` causes the
8af15d28
EN
112 current master reference to be exported along with all objects
113 added since its 10th ancestor commit.
f2dc849e
JS
114
115EXAMPLES
116--------
117
118-------------------------------------------------------------------
119$ git fast-export --all | (cd /empty/repository && git fast-import)
120-------------------------------------------------------------------
121
122This will export the whole repository and import it into the existing
123empty repository. Except for reencoding commits that are not in
124UTF-8, it would be a one-to-one mirror.
125
126-----------------------------------------------------
127$ git fast-export master~5..master |
128 sed "s|refs/heads/master|refs/heads/other|" |
129 git fast-import
130-----------------------------------------------------
131
132This makes a new branch called 'other' from 'master~5..master'
133(i.e. if 'master' has linear history, it will take the last 5 commits).
134
135Note that this assumes that none of the blobs and commit messages
136referenced by that revision range contains the string
137'refs/heads/master'.
138
139
140Limitations
141-----------
142
0b444cdb 143Since 'git fast-import' cannot tag trees, you will not be
f2dc849e
JS
144able to export the linux-2.6.git repository completely, as it contains
145a tag referencing a tree instead of a commit.
146
f2dc849e
JS
147GIT
148---
9e1f0a85 149Part of the linkgit:git[1] suite