Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions pages/common/git-fast-import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# git fast-import

> Import data into Git repositories using the fast-import stream format.
> More information: <https://git-scm.com/docs/git-fast-import>.

- Import data from a fast-import stream file:

`git fast-import < {{path/to/stream_file}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`git fast-import < {{path/to/stream_file}}`
`git < {{path/to/stream_file}} fast-import`

https://github.com/tldr-pages/tldr/blob/main/contributing-guides/style-guide.md#argument-order


- Import and show statistics:

`git fast-import --stats < {{path/to/stream_file}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`git fast-import --stats < {{path/to/stream_file}}`
`git < {{path/to/stream_file}} fast-import --stats`


- Import with a specific maximum number of pack bytes:

`git fast-import --max-pack-size {{size}} < {{path/to/stream_file}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`git fast-import --max-pack-size {{size}} < {{path/to/stream_file}}`
`git < {{path/to/stream_file}} fast-import --max-pack-size {{size}}`


- Import and create a new pack file when the current one reaches a certain size:

`git fast-import --big-file-threshold {{size}} < {{path/to/stream_file}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`git fast-import --big-file-threshold {{size}} < {{path/to/stream_file}}`
`git < {{path/to/stream_file}} fast-import --big-file-threshold {{size}}`


- Display help:

`git fast-import --help`