git status或者 git commit 中文文件显示乱码

1.美图

在这里插入图片描述# 2.背景
对于上传的中文文件显示乱码,core.quotepath没有设置好

执行 git commit之后如下

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is up to date with 'origin/master'.
#
# Changes to be committed:
#       modified:   "30-020-020-\347\274\226\350\257\221-open jdk 9\347\274\226\350\257\221.md"

3.解决方法

输入


git config --global core.quotepath false

lcc@lcc doc-jvm$ git config --global core.quotepath false


lcc@lcc doc-jvm$ git commit

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#       modified:   30-020-020-编译-open jdk 9编译.md
发布了1097 篇原创文章 · 获赞 452 · 访问量 138万+

猜你喜欢

转载自blog.csdn.net/qq_21383435/article/details/104919066
今日推荐