首页 > 其他 > 详细

git 初始化 中文编码、自动换行

时间:2018-09-02 10:19:24      阅读:192      评论:0      收藏:0      [点我收藏+]

解决中文编码:

git config --global core.quotepath false

git config --global gui.encoding utf-8

git config --global i18n.commitencoding utf-8

git config --global i18n.logoutputencoding gbk

lls --show-control-chars

 

解决自动换行:

git config --global core.autocrlf false

 

以下是简短说明:

git config --global core.quotepath false

cygwin中,git add时,显示274\232\350\256\256\346\200\273\347\273\223.png的乱码。

git config --global gui.encoding utf-8

git gui的界面编码

 

 

git config --global i18n.commitencoding utf-8

 commit log 提交时使用 utf-8 编码,可避免服务器上乱码,同时与linux上的提交保持一致!

 

 

git config --global i18n.logoutputencoding gbk

git log 时将 utf-8 编码转换成 gbk 编码,解决Msys bashgit log 乱码

 

lls --show-control-chars

MsysGit自带的bash,使用ls命令查看,中文文件名乱码。

 

 

git config --global core.autocrlf false

windows使用git时出现 warning LF will be replaced by CRLF

 

 

 

 

 

 

 

 

 

git 初始化 中文编码、自动换行

原文:https://www.cnblogs.com/dmc-nero/p/9572824.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!