git fast-export
all
Export the contents and history of a Git repository in a streamable, plain-text format.
More info →Examples (5)
Export the entire Git repository history to `stdout`
git fast-export --allExport the entire repository to a file
git fast-export --all > path/to/fileExport a specific branch only
git fast-export mainExport with `progress` statements every `n` objects (for showing progress during `git fast-import`)
git fast-export --progress n --all > path/to/fileExport only a specific subdirectory's history
git fast-export --all -- path/to/directory > path/to/filemade by @shridhargupta | data from tldr-pages