to be
a problem slover

windows下git log中文乱码解决办法

Table of Contents

问题描述

windows 下安装了 git bash,执行git log命令,中文的 git commit msg 出现乱码。

不管是在 windows cmd 窗口还是 git bash 窗口,都是乱码。

$ git status
commit 5d1281197d8879b22bcc217ccaaf0daba4f6b4ab
Author: Shiming <codingmylife@gmail.com>
Date:   Wed Oct 28 21:10:51 2020 +0800

    <D0>޸<C4><CE>ļ<FE><C3><FB>

解决办法

step1: 打开 git bash

step2: git bash 界面上点击右键 -> options -> text

step3: local 选择为 zh_CN, charector set 选择为 UTF-8

step4:git bash 上面输入以下命令

git config --global i18n.commitencoding utf-8
git config --global i18n.logoutputencoding utf-8

相关文章

windows 下 git status 乱码解决办法

赞(4) 打赏
欢迎转载,注明出处:刘世明的博客 » windows下git log中文乱码解决办法

评论 2

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    Thank you for your sharing. I am worried that I lack creative ideas. It is your article that makes me full of hope. Thank you. But, I have a question, can you help me? https://www.binance.com/register?ref=JW3W4Y3A

  2. #2

    Your article helped me a lot, is there any more related content? Thanks!

    Registrera dig3周前 (05-22)回复

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏