cleanup duplicate name_compare() functions
[git.git] / Documentation / git-fast-export.txt
blob221506b04ba55fac2151d8ac95da7df57eb9d411
1 git-fast-export(1)
2 ==================
4 NAME
5 ----
6 git-fast-export - Git data exporter
9 SYNOPSIS
10 --------
11 [verse]
12 'git fast-export [options]' | 'git fast-import'
14 DESCRIPTION
15 -----------
16 This program dumps the given revisions in a form suitable to be piped
17 into 'git fast-import'.
19 You can use it as a human-readable bundle replacement (see
20 linkgit:git-bundle[1]), or as a kind of an interactive
21 'git filter-branch'.
24 OPTIONS
25 -------
26 --progress=<n>::
27         Insert 'progress' statements every <n> objects, to be shown by
28         'git fast-import' during import.
30 --signed-tags=(verbatim|warn|warn-strip|strip|abort)::
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.
35 When asking to 'abort' (which is the default), this program will die
36 when encountering a signed tag.  With 'strip', the tags will silently
37 be made unsigned, with 'warn-strip' they will be made unsigned but a
38 warning will be displayed, with 'verbatim', they will be silently
39 exported and with 'warn', they will be exported, but you will see a
40 warning.
42 --tag-of-filtered-object=(abort|drop|rewrite)::
43         Specify how to handle tags whose tagged object is filtered out.
44         Since revisions and files to export can be limited by path,
45         tagged objects may be filtered completely.
47 When asking to 'abort' (which is the default), this program will die
48 when encountering such a tag.  With 'drop' it will omit such tags from
49 the output.  With 'rewrite', if the tagged object is a commit, it will
50 rewrite the tag to tag an ancestor commit (via parent rewriting; see
51 linkgit:git-rev-list[1])
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.
59 Note that earlier versions of this command did not complain and
60 produced incorrect results if you gave these options.
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.
71         The file will not be written if no new object has been
72         marked/exported.
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.
79 Any commits that have already been marked will not be exported again.
80 If the backend uses a similar \--import-marks file, this allows for
81 incremental bidirectional exporting of the repository by keeping the
82 marks the same across runs.
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.
90 --use-done-feature::
91         Start the stream with a 'feature done' stanza, and terminate
92         it with a 'done' command.
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.
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).
108 --refspec::
109         Apply the specified refspec to each ref exported. Multiple of them can
110         be specified.
112 [<git-rev-list-args>...]::
113         A list of arguments, acceptable to 'git rev-parse' and
114         'git rev-list', that specifies the specific objects and references
115         to export.  For example, `master~10..master` causes the
116         current master reference to be exported along with all objects
117         added since its 10th ancestor commit.
119 EXAMPLES
120 --------
122 -------------------------------------------------------------------
123 $ git fast-export --all | (cd /empty/repository && git fast-import)
124 -------------------------------------------------------------------
126 This will export the whole repository and import it into the existing
127 empty repository.  Except for reencoding commits that are not in
128 UTF-8, it would be a one-to-one mirror.
130 -----------------------------------------------------
131 $ git fast-export master~5..master |
132         sed "s|refs/heads/master|refs/heads/other|" |
133         git fast-import
134 -----------------------------------------------------
136 This makes a new branch called 'other' from 'master~5..master'
137 (i.e. if 'master' has linear history, it will take the last 5 commits).
139 Note that this assumes that none of the blobs and commit messages
140 referenced by that revision range contains the string
141 'refs/heads/master'.
144 Limitations
145 -----------
147 Since 'git fast-import' cannot tag trees, you will not be
148 able to export the linux.git repository completely, as it contains
149 a tag referencing a tree instead of a commit.
153 Part of the linkgit:git[1] suite