Files
cheatsheet-tldr/tldr/git-fast-export
2025-10-08 00:19:16 +00:00

30 lines
777 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# 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 subdirectorys history:
`git fast-export --all -- {{path/to/directory}} > {{path/to/file}}`