본문 바로가기
CS/DevOps

[Git] git status 한글 깨짐 해결하기

by zlzzlzz2l 2021. 9. 17.
반응형

문제

git bash로 git status 명령어를 입력했을 때, 만약 파일 이름이 한글이라면 원래 이름과 다르게 출력된다.

한글 깨짐

해결 방법

한글 깨짐을 해결하기 위해서 아래와 같이 터미널 창에 입력해주면 된다.

git config --global core.quotepath false

core.quotepath는 이름을 조정하는데, 0x80보다 큰 바이트를 가진 문자라면 unusal인 케이스로 포함되어 파일명이 깨지게 된다.

core.quotepath를 false로 설정해주면 큰 바이트를 가진 문자도 unusal 케이스로 분류되지 않고, 정상적으로 출력된다.

 

위 사진과 같이 정상적으로 status에서 한글이 출력된다.

 

참고 : https://git-scm.com/docs/git-config#Documentation (core.quotepath)

 

Git - git-config Documentation

When using the deprecated [section.subsection] syntax, changing a value will result in adding a multi-line key instead of a change, if the subsection is given with at least one uppercase character. For example when the config looks like [section.subsection

git-scm.com

 

반응형

댓글