撰于 阅读 82

Git 中文乱码的处理

问题描述

使用 Git 查看状态: $ git status

显示如下:

xxxxxxxxx(use "git push" to publish your local commits)
Untracked files:(use "git add ..." to include in what will be committed)"1-\345\257\271\346\225\260\346\215\256\347\233\264\346\216\245\345\210\206\346\236\220/plotData.m"

nothing added to commit but untracked files present (use "git add" to track)

由于文件夹使用中文命名,出现乱码。

解决办法

输入命令:git config --global core.quotepath false

解决效果

使用 Git 查看状态: $ git status

显示如下:

xxxxxxxxx(use "git push" to publish your local commits)
Untracked files:(use "git add ..." to include in what will be committed)1-对数据直接分析/plotData.m

nothing added to commit but untracked files present (use "git add" to track)

中文文件夹名称可以正常显示。


评论已关闭