로컬 폴더에 git init를 해주었는데
git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /Users/XXXX/XXXXX/.git/
이러한 메시지가 뜨면서 폴더의 branch
가 master
로 자동 생성되더라고요
master
가 아닌 main
브랜치로 변경해주시면 됩니다.
git config --global init.defaultBranch main
명령어를 치시고 터미널을 나갔다 들어오면 main
브랜치가 적용된걸 확인하실 수 있습니다.
+)
만약 확인이 안되시면
로컬 폴더의 .git
폴더를 지우셨다가 git init
를 다시 해보세요!
'🐈⬛ 깃 : Git' 카테고리의 다른 글
[git] 작성자 확인, 변경하는 법 (0) | 2024.08.02 |
---|---|
[Git] 로컬 파일 깃에 연동시키기 (1) | 2024.02.02 |