8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitで日本語のファイルを扱うときに数字コードが表示される

Last updated at Posted at 2017-01-12

git status で日本語のファイル名を表示できなかった

git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        "memo/\343\201\246\343\201\231\343\201\250.txt"

対応策

gitの設定を変えてやればいい

git config --local core.quotepath false

↓設定反映後

git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

        memo/てすと.txt

その他

ちなみに.gitconfigに記載する場合は下記の[core]のブロックを追加してやればいい

.gitconfig
[alias]
	st = status
	ci = commit
	co = checkout
	bra = branch
[user]
	name = KTakata
	email = hogehoge@test.com
[gui]
	encoding = utf-8
[core]
	quotepath = false 

8
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?