[Git] 로컬 브랜치 이름으로 자동 Push 설정하기

새로운 브랜치를 만든 후 보통 다음과 같이 push 합니다.

git push -u origin feature/login

하지만 아래 설정을 하면 git push만으로 자동으로 원격 브랜치가 생성되고 upstream이 설정됩니다.

git config --global push.autoSetupRemote true
git config --global push.default current

이후에는 다음처럼 사용할 수 있습니다.

git checkout -b feature/login
git push

origin/feature/login 브랜치가 자동 생성되고 upstream도 함께 설정됩니다.

[Windows] Command Prompt의 Current Code page 변경

Windows에서 명령줄을 띄워서 작업할 때, 어떤 에러 메시지 등을 google에서 찾아보고 싶은 경우 같은 때, 나오는 메시지의 언어를 바꾸고 싶을 때가 있다. 이럴 때 “LANG” 환경 변수 등을 바꾸어도 그대로 에러 메시지 등이 우리말로 나온다. 요건 mingw 같은 환경에서 shell을 써도 마찬가지. 한국판 Windows를 깔면 기본이 CP949로 설정되어 에러 메시지 등이 우리말로 나오는 것인데, 다음과 같이 CHCP 명령을 이용하면 된다. 65001은 UTF-8이다.

CHCP 65001

참고: https://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8