본문 바로가기

Git

[Git] git init 입력하면 Using 'master' as the name for the initial branch 에러 메세지

git을 초기화하면 아래와 에러가 뜨는데 왜 뜨는걸까?

//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>

 

해결방법

 

main을 기본 브런치로 해서 명령어를 입력하고 init.defaultBranch 값을 확인하니 main으로 나옴.. 

$ git config --global init.defaultBranch main

 

 

 

 

 

반응형