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
반응형
'Git' 카테고리의 다른 글
[Git] remote 명령어로 GitHub 올리기(원격저장소 연결 및 끊기) (0) | 2022.11.02 |
---|---|
[Git] 터미널에서 Git 명령어 사용하기(+깃허브) (0) | 2022.06.17 |
[Git] clone명령어로 GitHub 로컬에 가져오기 (0) | 2022.06.13 |