1. Git Bash

  1. Open Windows Terminal

  2. Enter the Settings page (Ctrl + ,)

  3. Click the Add a new profile on the left bottom panel

  4. On the Add a new profile page, click New empty profile or Duplicate from an existed profile

  5. On the new profile page, fill the following options:

    • Name: Git Bash

    • Command Line: C:\Program Files\Git\bin\bash.exe -i -l

      The -i -l or --interactive --login options will make Git Bash work on non-ASCII text well.
      • Without -i -l:

        $ ls -l /tmp/hello/
        total 0
        -rw-r--r-- 1 ousia 197121 0 Aug 29 16:46 '□□'$'\226''□'$'\225\214'
      • With -i -l:

        $ ls -l /tmp/hello/
        total 0
        -rw-r--r-- 1 ousia 197121 0 Aug 29 16:46 世界
    • Starting Directory: %USERPROFILE%

    • Icon: C:\Program Files\Git\git-bash.exe

  6. Click the Save on the right bottom to finish it.

To solve Git not displaying unicode file names:

$ git init --initial-branch=main
$ touch 'Hello 世界.txt'
$ git status
On branch main

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        "Hello \344\270\226\347\225\214.txt"

nothing added to commit but untracked files present (use "git add" to track)

$ git config core.quotePath false

$ git status
On branch main

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        Hello 世界.txt

nothing added to commit but untracked files present (use "git add" to track)

You can also specify the --global option as below:

git config --global core.quotePath false

2. Cygwin

  • Run setup-x86_64.exe any time you want to update or install a Cygwin package for 64-bit windows.

  • The setup program will check by default if it runs with administrative privileges and, if not, will try to elevate the process. If you want to avoid this behaviour and install under an unprivileged account just for your own usage, run setup with the --no-admin option.

    ./setup-x86_64.exe --no-admin
  • Add the ROOT_INSTALL_DIRECTORY + bin directory to the PATH environment, such as:

    C:\cygwin64\bin