From e8c41c1e42a977d20a94033656ad99ff7f249f77 Mon Sep 17 00:00:00 2001 From: Asurada <43401755+ousugo@users.noreply.github.com> Date: Tue, 23 Nov 2021 15:15:03 +0800 Subject: [PATCH] git-config: add Chinese translation (#7464) --- pages.zh/common/git-config.md | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages.zh/common/git-config.md diff --git a/pages.zh/common/git-config.md b/pages.zh/common/git-config.md new file mode 100644 index 0000000000..e0c3d72ffb --- /dev/null +++ b/pages.zh/common/git-config.md @@ -0,0 +1,37 @@ +# git config + +> 管理 Git 仓库的自定义设置项。 +> 这些设置可以分为局部设置(只对当前仓库生效)和全局设置(对当前用户生效)。 +> 更多信息:. + +- 列出局部设置项(存储在当前仓库的 `.git/config`): + +`git config --list --local` + +- 列出全局配置项(存储在 `~/.gitconfig`): + +`git config --list --global` + +- 列出所有被修改过的配置项,包含局部的以及全局的: + +`git config --list` + +- 获取某个配置项的值: + +`git config alias.unstage` + +- 设置某个全局配置项: + +`git config --global alias.unstage "reset HEAD --"` + +- 将某个全局配置项恢复为默认值: + +`git config --global --unset alias.unstage` + +- 使用默认编辑器修改本地设置: + +`git config --edit` + +- 使用默认编辑器修改全局设置: + +`git config --global --edit`