git bash here 显示中文
时间: 2023-07-09 14:24:59 浏览: 189
要在 Git Bash 中正确显示中文,需要进行以下设置:
1. 打开 Git Bash 终端并输入以下命令:
```
git config --global core.quotepath false
```
2. 在 Windows 系统中安装中文字体,如“微软雅黑”、“SimSun”等。
3. 在 Git Bash 终端中设置字符集为 UTF-8,输入以下命令:
```
export LANG="zh_CN.UTF-8"
```
4. 在 Git Bash 终端中打开文本文件时,使用正确的文本编辑器,如 Notepad++、Sublime Text 等。在这些编辑器中,可以设置文件编码为 UTF-8。
通过以上操作,就可以在 Git Bash 中正确显示中文了。
相关问题
git bash here不显示
在Windows系统中,如果你发现右键点击文件夹时没有出现“Git Bash Here”选项,可能是由于以下几个原因导致的:
1. **Git未正确安装**:
- 确保你已经安装了Git,并且安装过程中选择了“Git Bash Here”选项。如果没有,可以在安装过程中重新选择相关选项。
2. **注册表项缺失**:
- 有时注册表项可能会丢失或损坏。你可以手动添加“Git Bash Here”选项到右键菜单。
- 打开注册表编辑器(按 `Win + R`,输入 `regedit` 并回车)。
- 导航到以下路径:
```
HKEY_CLASSES_ROOT\Directory\Background\shell
```
- 右键点击 `shell`,选择 `新建` -> `项`,命名为 `Git Bash Here`。
- 选中 `Git Bash Here`,在右侧窗口中双击 `默认`,将其值设置为 `Git Bash Here`。
- 右键点击 `Git Bash Here`,选择 `新建` -> `项`,命名为 `command`。
- 选中 `command`,在右侧窗口中双击 `默认`,将其值设置为Git的安装路径,例如:
```
"C:\Program Files\Git\git-bash.exe" --cd=%V
```
3. **环境变量未配置**:
- 确保Git的安装路径已经添加到系统的环境变量中。右键点击 `此电脑`,选择 `属性`,然后点击 `高级系统设置`,在 `系统属性` 窗口中选择 `环境变量`,在 `系统变量` 中找到 `Path`,点击 `编辑`,确保Git的安装路径(例如 `C:\Program Files\Git\bin` 和 `C:\Program Files\Git\cmd`)已经添加进去。
通过以上步骤,你应该能够在右键菜单中看到“Git Bash Here”选项。
git gui here和git bash here
"git gui here" 和 "git bash here" 都是 Windows 系统中的命令,用于在当前文件夹中打开 Git 的图形界面或命令行界面。前者打开 Git Gui,后者打开 Git Bash。
阅读全文
相关推荐
















