### 设置 Git 安全目录:
```shell
# 设置多个安全目录,允许在这些目录下执行git操作
git config --global --add safe.directory "Path"
```
### 编辑全局 Git 配置:
```shell
git config --global --edit
```
### 获取和管理代理设置:
```shell
# 获取全局http代理设置
git config --global --get http.proxy
# 获取全局https代理设置
git config --global --get https.proxy
# 移除全局http代理设置
git config --global --unset http.proxy
# 移除全局https代理设置
git config --global --unset https.proxy
# 设置全局http代理为127.0.0.1:1080
git config --global http.proxy 127.0.0.1:1080
# 设置全局https代理为127.0.0.1:1080
git config --global https.proxy 127.0.0.1:1080
```
### 设置用户信息:
```shell
# 设置全局用户邮箱
git config --global user.email "xxxxx@gmail.com"
# 设置全局用户名
git config --global user.name "xxxxx"
```
### 查看或设置凭据存储方式:
```shell
# 查看当前全局的凭据存储方式
git config --global credential.store
```
请注意,如果要设置凭据存储方式(如使用 `manager-core`),应根据实际情况添加以下命令:
```shell
# 设置全局凭据存储为Windows Credential Manager (适用于Windows系统)
git config --global credential.helper manager-core
```