Skip to content

git-{commit-tree, commits-since, contrib}: add Chinese translation #16108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 12, 2025
Merged
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions pages.zh/common/git-commit-tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# git commit-tree

> 用于创建提交对象的底层工具。
> 参考: `git commit`.
> 更多信息:<https://git-scm.com/docs/git-commit-tree>.

- 创建带有指定提交信息的提交对象:

`git commit-tree {{树对象哈希}} -m "{{提交信息}}"`

- 从文件读取提交信息创建提交对象(使用 `-` 表示从标准输入读取):

`git commit-tree {{树对象哈希}} -F {{路径/到/文件}}`

- 创建 GPG 签名过的提交对象:

`git commit-tree {{树对象哈希}} -m "{{提交信息}}" --gpg-sign`

- 创建指定父提交的提交对象:

`git commit-tree {{树对象哈希}} -m "{{提交信息}}" -p {{父提交哈希}}`
21 changes: 21 additions & 0 deletions pages.zh/common/git-commits-since.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# git commits-since

> 显示从指定时间点以来的提交记录。
> 属于 `git-extras` 一部分。
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-commits-since>.

- 显示从昨天以来的所有提交:

`git commits-since {{yesterday}}`

- 显示从上周以来的所有提交:

`git commits-since {{last week}}`

- 显示从上个月以来的所有提交:

`git commits-since {{last month}}`

- 显示从昨天下午2点以来的所有提交:

`git commits-since {{yesterday 2pm}}`
9 changes: 9 additions & 0 deletions pages.zh/common/git-contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# git contrib

> 显示指定作者的提交记录。
> 属于 `git-extras` 一部分。
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-contrib>.

- 显示指定作者的所有提交哈希及对应提交信息:

`git contrib {{作者名}}`