文章

git 命令中文乱码解决方法

1
2
3
4
5
6
7
8
9
10
11
12
# Windows 命令行或 PowerShell
chcp 65001

# macOS 和 Linux(修改终端配置文件后执行)
source ~/.bashrc  # 或者 source ~/.zshrc

# 设置 Git 显示中文文件名
git config --global core.quotepath false

# 查看 Git 状态
git status

本文由作者按照 CC BY 4.0 进行授权