mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
git-{cat-file, changelog}: add Chinese translation (#16074)
This commit is contained in:
parent
a6ebf67ade
commit
927006a159
2 changed files with 49 additions and 0 deletions
16
pages.zh/common/git-cat-file.md
Normal file
16
pages.zh/common/git-cat-file.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# git cat-file
|
||||
|
||||
> 查看 Git 仓库对象的内容或类型和大小信息。
|
||||
> 更多信息:<https://git-scm.com/docs/git-cat-file>.
|
||||
|
||||
- 获取 HEAD 提交的字节大小:
|
||||
|
||||
`git cat-file -s HEAD`
|
||||
|
||||
- 获取指定 Git 对象的类型(blob、tree、commit、tag):
|
||||
|
||||
`git cat-file -t {{8c442dc3}}`
|
||||
|
||||
- 根据对象类型打印指定 Git 对象的内容:
|
||||
|
||||
`git cat-file -p {{HEAD~2}}`
|
33
pages.zh/common/git-changelog.md
Normal file
33
pages.zh/common/git-changelog.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# git changelog
|
||||
|
||||
> 从仓库提交和标签生成变更日志报告。
|
||||
> 属于 `git-extras` 的一部分。
|
||||
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-changelog>.
|
||||
|
||||
- 更新现有文件或创建新的 `History.md` 文件,包含自最新 Git 标签以来的提交信息:
|
||||
|
||||
`git changelog`
|
||||
|
||||
- 列出当前版本的提交:
|
||||
|
||||
`git changelog --list`
|
||||
|
||||
- 列出从标签 `2.1.0` 到现在的提交范围
|
||||
|
||||
`git changelog --list --start-tag {{2.1.0}}`
|
||||
|
||||
- 以美观格式列出标签 `0.5.0` 到 `1.0.0` 之间的提交:
|
||||
|
||||
`git changelog --start-tag {{0.5.0}} --final-tag {{1.0.0}}`
|
||||
|
||||
- 以美观格式列出提交 `0b97430` 到标签 `1.0.0` 之间的提交:
|
||||
|
||||
`git changelog --start-commit {{0b97430}} --final-tag {{1.0.0}}`
|
||||
|
||||
- 指定 `CHANGELOG.md` 作为输出文件:
|
||||
|
||||
`git changelog {{CHANGELOG.md}}`
|
||||
|
||||
- 完全替换当前变更日志文件的内容:
|
||||
|
||||
`git changelog --prune-old`
|
Loading…
Add table
Reference in a new issue