Skip to content

git-{bulk, bundle}: add Chinese translation #16073

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
37 changes: 37 additions & 0 deletions pages.zh/common/git-bulk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# git bulk

> 批量操作多个 Git 仓库。
> 属于 `git-extras`的一部分。
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-bulk>.

- 将当前目录注册为工作区:

`git bulk --addcurrent {{工作区名称}}`

- 注册一个工作区用于批量操作:

`git bulk --addworkspace {{工作区名称}} {{到仓库的绝对路径}}`

- 在指定目录克隆仓库并注册为工作区:

`git bulk --addworkspace {{工作区名称}} {{仓库父目录的绝对路径}} --from {{远程仓库地址}}`

- 从换行分隔的远程仓库列表克隆并注册为工作区:

`git bulk --addworkspace {{工作区名称}} {{/路径/到/根/目录}} --from {{/路径/到/文件}}`

- 列出所有已注册的工作区:

`git bulk --listall`

- 在当前工作区的所有仓库上执行 Git 命令:

`git bulk {{命令}} {{命令参数}}`

- 删除指定工作区:

`git bulk --removeworkspace {{工作区名称}}`

- 删除所有工作区:

`git bulk --purge`
36 changes: 36 additions & 0 deletions pages.zh/common/git-bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# git bundle

> 将对象和引用打包成归档文件。
> 更多信息:<https://git-scm.com/docs/git-bundle>.

- 创建包含特定分支所有对象和引用的打包文件:

`git bundle create {{路径/到/文件.bundle}} {{分支名}}`

- 创建包含所有分支的打包文件:

`git bundle create {{路径/到/文件.bundle}} --all`

- 创建当前分支最近5次提交的打包文件:

`git bundle create {{路径/到/文件.bundle}} -5 {{HEAD}}`

- 创建最近7天提交的打包文件:

`git bundle create {{路径/到/文件.bundle}} --since 7.days {{HEAD}}`

- 验证打包文件是否有效且可应用到当前仓库:

`git bundle verify {{路径/到/文件.bundle}}`

- 显示打包文件中包含的引用列表:

`git bundle unbundle {{路径/到/文件.bundle}}`

- 从打包文件中解包特定分支到当前仓库:

`git pull {{路径/到/文件.bundle}} {{分支名}}`

- 从打包文件创建新仓库:

`git clone {{路径/到/文件.bundle}}`