HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git fast-export — Export the contents and history of a Git repository in a streamable, plain-text format. More informa

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thegit fast-exportcommandcontentsandhistorycliexport

Problem

How to use the git fast-export command: Export the contents and history of a Git repository in a streamable, plain-text format. More information: <https://manned.org/git-fast-export>.

Solution

git fast-export — Export the contents and history of a Git repository in a streamable, plain-text format. More information: <https://manned.org/git-fast-export>.

Export the entire Git repository history to stdout:
git fast-export --all


Export the entire repository to a file:
git fast-export --all > {{path/to/file}}


Export a specific branch only:
git fast-export {{main}}


Export with progress statements every n objects (for showing progress during git fast-import):
git fast-export --progress {{n}} --all > {{path/to/file}}


Export only a specific subdirectory's history:
git fast-export --all -- {{path/to/directory}} > {{path/to/file}}

Code Snippets

Export the entire Git repository history to `stdout`

git fast-export --all

Export the entire repository to a file

git fast-export --all > {{path/to/file}}

Export a specific branch only

git fast-export {{main}}

Export with `progress` statements every `n` objects (for showing progress during `git fast-import`)

git fast-export --progress {{n}} --all > {{path/to/file}}

Export only a specific subdirectory's history

git fast-export --all -- {{path/to/directory}} > {{path/to/file}}

Context

tldr-pages: common/git fast-export

Revisions (0)

No revisions yet.