Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 1 | git-fast-export(1) |
| 2 | ================== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-fast-export - Git data exporter |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | fce7c7e | 2008-07-02 03:06:38 | [diff] [blame] | 11 | 'git fast-export [options]' | 'git fast-import' |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 12 | |
| 13 | DESCRIPTION |
| 14 | ----------- |
| 15 | This program dumps the given revisions in a form suitable to be piped |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 16 | into 'git-fast-import'. |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 17 | |
Junio C Hamano | ec87f52 | 2008-12-10 08:35:25 | [diff] [blame] | 18 | You can use it as a human-readable bundle replacement (see |
Junio C Hamano | 35738e8 | 2008-01-07 07:55:46 | [diff] [blame] | 19 | linkgit:git-bundle[1]), or as a kind of an interactive |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 20 | 'git-filter-branch'. |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 21 | |
| 22 | |
| 23 | OPTIONS |
| 24 | ------- |
| 25 | --progress=<n>:: |
| 26 | Insert 'progress' statements every <n> objects, to be shown by |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 27 | 'git-fast-import' during import. |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 28 | |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 29 | --signed-tags=(verbatim|warn|strip|abort):: |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 30 | Specify how to handle signed tags. Since any transformation |
| 31 | after the export can change the tag names (which can also happen |
| 32 | when excluding revisions) the signatures will not match. |
| 33 | + |
| 34 | When asking to 'abort' (which is the default), this program will die |
| 35 | when encountering a signed tag. With 'strip', the tags will be made |
Junio C Hamano | 5825687 | 2007-12-04 08:31:13 | [diff] [blame] | 36 | unsigned, with 'verbatim', they will be silently exported |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 37 | and with 'warn', they will be exported, but you will see a warning. |
| 38 | |
Junio C Hamano | ceec6ab | 2009-07-26 21:37:52 | [diff] [blame] | 39 | --tag-of-filtered-object=(abort|drop|rewrite):: |
| 40 | Specify how to handle tags whose tagged objectis filtered out. |
| 41 | Since revisions and files to export can be limited by path, |
| 42 | tagged objects may be filtered completely. |
| 43 | + |
| 44 | When asking to 'abort' (which is the default), this program will die |
| 45 | when encountering such a tag. With 'drop' it will omit such tags from |
| 46 | the output. With 'rewrite', if the tagged object is a commit, it will |
| 47 | rewrite the tag to tag an ancestor commit (via parent rewriting; see |
| 48 | linkgit:git-rev-list[1]) |
| 49 | |
Junio C Hamano | 7f80ae8 | 2008-07-30 18:31:35 | [diff] [blame] | 50 | -M:: |
| 51 | -C:: |
| 52 | Perform move and/or copy detection, as described in the |
| 53 | linkgit:git-diff[1] manual page, and use it to generate |
| 54 | rename and copy commands in the output dump. |
| 55 | + |
| 56 | Note that earlier versions of this command did not complain and |
| 57 | produced incorrect results if you gave these options. |
| 58 | |
Junio C Hamano | 4224f99 | 2008-06-23 07:14:08 | [diff] [blame] | 59 | --export-marks=<file>:: |
| 60 | Dumps the internal marks table to <file> when complete. |
| 61 | Marks are written one per line as `:markid SHA-1`. Only marks |
| 62 | for revisions are dumped; marks for blobs are ignored. |
| 63 | Backends can use this file to validate imports after they |
| 64 | have been completed, or to save the marks table across |
| 65 | incremental runs. As <file> is only opened and truncated |
| 66 | at completion, the same path can also be safely given to |
| 67 | \--import-marks. |
| 68 | |
| 69 | --import-marks=<file>:: |
| 70 | Before processing any input, load the marks specified in |
| 71 | <file>. The input file must exist, must be readable, and |
| 72 | must use the same format as produced by \--export-marks. |
| 73 | + |
| 74 | Any commits that have already been marked will not be exported again. |
| 75 | If the backend uses a similar \--import-marks file, this allows for |
| 76 | incremental bidirectional exporting of the repository by keeping the |
| 77 | marks the same across runs. |
| 78 | |
Junio C Hamano | 54bf1e2 | 2008-12-20 06:30:11 | [diff] [blame] | 79 | --fake-missing-tagger:: |
| 80 | Some old repositories have tags without a tagger. The |
| 81 | fast-import protocol was pretty strict about that, and did not |
| 82 | allow that. So fake a tagger to be able to fast-import the |
| 83 | output. |
| 84 | |
Junio C Hamano | bacccda | 2009-08-03 08:07:12 | [diff] [blame] | 85 | --no-data:: |
| 86 | Skip output of blob objects and instead refer to blobs via |
| 87 | their original SHA-1 hash. This is useful when rewriting the |
| 88 | directory structure or history of a repository without |
| 89 | touching the contents of individual files. Note that the |
| 90 | resulting stream can only be used by a repository which |
| 91 | already contains the necessary objects. |
| 92 | |
Junio C Hamano | ceec6ab | 2009-07-26 21:37:52 | [diff] [blame] | 93 | [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 Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 99 | |
| 100 | EXAMPLES |
| 101 | -------- |
| 102 | |
| 103 | ------------------------------------------------------------------- |
| 104 | $ git fast-export --all | (cd /empty/repository && git fast-import) |
| 105 | ------------------------------------------------------------------- |
| 106 | |
| 107 | This will export the whole repository and import it into the existing |
| 108 | empty repository. Except for reencoding commits that are not in |
| 109 | UTF-8, it would be a one-to-one mirror. |
| 110 | |
| 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' |
| 118 | (i.e. if '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 | |
| 124 | |
| 125 | Limitations |
| 126 | ----------- |
| 127 | |
Junio C Hamano | ba4b928 | 2008-07-06 05:20:31 | [diff] [blame] | 128 | Since 'git-fast-import' cannot tag trees, you will not be |
Junio C Hamano | 0c99970 | 2007-12-03 09:57:55 | [diff] [blame] | 129 | able to export the linux-2.6.git repository completely, as it contains |
| 130 | a tag referencing a tree instead of a commit. |
| 131 | |
| 132 | |
| 133 | Author |
| 134 | ------ |
| 135 | Written by Johannes E. Schindelin <johannes.schindelin@gmx.de>. |
| 136 | |
| 137 | Documentation |
| 138 | -------------- |
| 139 | Documentation by Johannes E. Schindelin <johannes.schindelin@gmx.de>. |
| 140 | |
| 141 | GIT |
| 142 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 143 | Part of the linkgit:git[1] suite |