Skip to content

git-{clear, clean}: add Chinese translation #16101

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

> 从工作区删除未被 Git 跟踪的文件。
> 更多信息:<https://git-scm.com/docs/git-clean>.

- 删除未跟踪的文件:

`git clean`

- 交互式删除未跟踪的文件:

`git clean {{[-i|--interactive]}}`

- 显示将被删除的文件(模拟运行,不实际删除):

`git clean {{[-n|--dry-run]}}`

- 强制删除未跟踪的文件:

`git clean {{[-f|--force]}}`

- 强制删除未跟踪的目录:

`git clean {{[-f|--force]}} -d`

- 删除未跟踪的文件(包括被忽略的文件,在 `.gitignore` 和 `.git/info/exclude`的文件):

`git clean -x`
9 changes: 9 additions & 0 deletions pages.zh/common/git-clear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# git clear

> 将 Git 工作目录清理至如同刚克隆时的状态(包含 `.gitignore` 中的文件)。
> 属于 `git-extras` 的一部分。
> 更多信息:<https://github.com/tj/git-extras/blob/master/Commands.md#git-clear>.

- 重置所有已跟踪文件并删除所有未跟踪文件(包括 `.gitignore` 中的文件):

`git clear`