git-*: convert options to longform and minor fixes (#13441)

Co-authored-by: spageektti <git@spageektti.cc>
Co-authored-by: Fazle Arefin <fazlearefin@users.noreply.github.com>
This commit is contained in:
Managor
2024-08-31 14:06:48 +03:00
committed by GitHub
parent 6d983d1acb
commit db25f60eb1
20 changed files with 46 additions and 46 deletions

View File

@@ -5,24 +5,24 @@
- Create a tar archive from the contents of the current HEAD and print it to `stdout`:
`git archive --verbose HEAD`
`git archive {{--verbose|-v}} HEAD`
- Use the Zip format and report progress verbosely:
`git archive {{-v|--verbose}} --format zip HEAD`
`git archive {{--verbose|-v}} --format zip HEAD`
- Output the Zip archive to a specific file:
`git archive -v {{-o|--output}} {{path/to/file.zip}} HEAD`
`git archive {{--verbose|-v}} {{--output|-o}} {{path/to/file.zip}} HEAD`
- Create a tar archive from the contents of the latest commit of a specific branch:
`git archive -o {{path/to/file.tar}} {{branch_name}}`
`git archive {{--output|-o}} {{path/to/file.tar}} {{branch_name}}`
- Use the contents of a specific directory:
`git archive -o {{path/to/file.tar}} HEAD:{{path/to/directory}}`
`git archive {{--output|-o}} {{path/to/file.tar}} HEAD:{{path/to/directory}}`
- Prepend a path to each file to archive it inside a specific directory:
`git archive -o {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD`
`git archive {{--output|-o}} {{path/to/file.tar}} --prefix {{path/to/prepend}}/ HEAD`