码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-09-02 10:26:54      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:placed   als   pre   inux   put   char   justify   lin   bsp   

解决中文编码:

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 初始化 中文编码、自动换行

标签:placed   als   pre   inux   put   char   justify   lin   bsp   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!