最近重新安装电脑,发现电脑中的GIt 命令行一直显示为UTF-8编码没有正常显示中文。
Git 在Mac下的中文乱码问题
其实方案很简单,把~/.gitconfig里修改好,source下就行了。看官可以在任何linux下这么搞。
Git 在Mac下的中文乱码问题

[core]
        autocrlf = input
        excludesfile = /Users/lonecloud/.gitignore_global
        quotepath = false
[difftool "sourcetree"]
        cmd = opendiff \"$LOCAL\" \"$REMOTE\"
        path =
[mergetool "sourcetree"]
        cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
        trustExitCode = true
[gui]
        encoding = utf-8
[i18n "commit"]
        encoding = utf-8
[i18n]
        logoutputencoding = utf-8
        commitencoding = utf-8

配置可见Github

相关文章:

  • 2021-06-11
  • 2022-01-05
  • 2021-07-20
  • 2021-07-06
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2021-10-16
  • 2021-12-16
  • 2021-06-26
  • 2021-10-14
  • 2021-08-20
相关资源
相似解决方案