
Contents
해결법GitHub에서 초기 레포지토리 생성시 main 브랜치를 사용하나
Git 로컬에선 master 브랜치를 생성해버리는 경우가 잦다, 아니 그렇게 만든다
왜 그런지는 정말 이유가 귀찮던데 굳이 적을 필요도 못 느끼겠다
해결법
원격 레포지토리 확인
git remote -r or git remote -a
master 인 로컬을 main으로 쓰는게 보통 일반적일 것이다
git branch -m matster main → master를 main으로 바꾸자
git push -u origin main
앞으로 그렇게 하지 않게 local git을 설정하자
git config —global init.defaultBranch main
Share article