새소식

ETC/Tip - 2023.03.09

[Git] 한글 깨짐 해결하기

  • -

문제 상황

깃 작업 중에서 diff나 status로 로그를 찍어볼 때, 한글이 깨져서 나오는 경우가 있다. 

git diff --name-only auto-readme..origin/auto-readme
<<
"programmers/solved/lv2_\353\215\247\354\271\240\355\225\230\352\270\260.py"

 

해결 방법

  • core.quotepath 옵션을 False로 바꿔주면 된다.
git config --global core.quotepath False
  • 한글이 깨지지 않고 나온다!
git diff --name-only auto-readme..origin/auto-readme
<<
programmers/solved/lv2_덧칠하기.py

참고

 

git not displaying unicode file names

I'm using git 2.5.4 on Mac OS X. I have filenames containing é and git is displaying it with escapes. Is there a way to make it use unicode and show the character? The terminal can obviously hand...

stackoverflow.com

 

Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.