Home Explore Blog CI



git

1st chunk of `Documentation/git-fast-import.adoc`
4fd5dfbf66325f9447828bcfa349cdc32e48935df9418ede0000000100000fad
git-fast-import(1)
==================

NAME
----
git-fast-import - Backend for fast Git data importers


SYNOPSIS
--------
[verse]
frontend | 'git fast-import' [<options>]

DESCRIPTION
-----------
This program is usually not what the end user wants to run directly.
Most end users want to use one of the existing frontend programs,
which parses a specific type of foreign source and feeds the contents
stored there to 'git fast-import'.

fast-import reads a mixed command/data stream from standard input and
writes one or more packfiles directly into the current repository.
When EOF is received on standard input, fast import writes out
updated branch and tag refs, fully updating the current repository
with the newly imported data.

The fast-import backend itself can import into an empty repository (one that
has already been initialized by 'git init') or incrementally
update an existing populated repository.  Whether or not incremental
imports are supported from a particular foreign source depends on
the frontend program in use.


OPTIONS
-------

--force::
	Force updating modified existing branches, even if doing
	so would cause commits to be lost (as the new commit does
	not contain the old commit).

--quiet::
	Disable the output shown by --stats, making fast-import usually
	be silent when it is successful.  However, if the import stream
	has directives intended to show user output (e.g. `progress`
	directives), the corresponding messages will still be shown.

--stats::
	Display some basic statistics about the objects fast-import has
	created, the packfiles they were stored into, and the
	memory used by fast-import during this run.  Showing this output
	is currently the default, but can be disabled with --quiet.

--allow-unsafe-features::
	Many command-line options can be provided as part of the
	fast-import stream itself by using the `feature` or `option`
	commands. However, some of these options are unsafe (e.g.,
	allowing fast-import to access the filesystem outside of the
	repository). These options are disabled by default, but can be
	allowed by providing this option on the command line.  This
	currently impacts only the `export-marks`, `import-marks`, and
	`import-marks-if-exists` feature commands.
+
	Only enable this option if you trust the program generating the
	fast-import stream! This option is enabled automatically for
	remote-helpers that use the `import` capability, as they are
	already trusted to run their own code.

Options for Frontends
~~~~~~~~~~~~~~~~~~~~~

--cat-blob-fd=<fd>::
	Write responses to `get-mark`, `cat-blob`, and `ls` queries to the
	file descriptor <fd> instead of `stdout`.  Allows `progress`
	output intended for the end-user to be separated from other
	output.

--date-format=<fmt>::
	Specify the type of dates the frontend will supply to
	fast-import within `author`, `committer` and `tagger` commands.
	See ``Date Formats'' below for details about which formats
	are supported, and their syntax.

--done::
	Terminate with error if there is no `done` command at the end of
	the stream.  This option might be useful for detecting errors
	that cause the frontend to terminate before it has started to
	write a stream.

Locations of Marks Files
~~~~~~~~~~~~~~~~~~~~~~~~

--export-marks=<file>::
	Dumps the internal marks table to <file> when complete.
	Marks are written one per line as `:markid SHA-1`.
	Frontends can use this file to validate imports after they
	have been completed, or to save the marks table across
	incremental runs.  As <file> is only opened and truncated
	at checkpoint (or completion) the same path can also be
	safely given to --import-marks.

--import-marks=<file>::
	Before processing any input, load the marks specified in
	<file>.  The input file must exist, must be readable, and
	must use the same format as produced by --export-marks.
	Multiple options may be supplied to import more than one
	set of marks.  If a mark is defined to different values,
	the last file wins.

--import-marks-if-exists=<file>::

Title: Git Fast Import Documentation
Summary
The git-fast-import command is a backend for fast Git data importers, it reads a mixed command and data stream from standard input and writes packfiles directly into the current repository, supporting incremental updates and various options for customizing its behavior.