How to support Chinese for Git in Windows Back

Firstly, find out the root path of Git installed in Windows.

Run some commands on the client:

$ git config --global core.quotepath false # Show encoding status
$ git config --global gui.encoding utf-8 # GUI encoding
$ git config --global i18n.commit.encoding utf-8 # Commit encoding
$ git config --global i18n.logoutputencoding utf-8 # Log encoding
$ export LESSCHARSET=utf-8 # git log will use `less` to paginate information, which should be encoded in UTF-8

Then, change some configuration files in the folder etc, and add some lines right behind files as the following guide:

  • /etc/gitconfig:

          encoding = utf-8
          commitencoding = utf-8
          pathnameencoding = utf-8
  • /etc/git-completion.bash:

      alias ls="ls --show-control-chars --color"
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.