카테고리 없음
git init hint 제거
jjnll
2023. 2. 22. 15:23
결론:
디폴트 브랜치명을 main으로 바꿈
과정:
원래 안떴던 것 같은데 언제부턴가 init하면 계속 떠서 해결하고자 찾아봄
(base) ***ui-MacBookAir:git_pjs ***$ git init
힌트: Using 'master' as the name for the initial branch. This default branch name
힌트: is subject to change. To configure the initial branch name to use in all
힌트: of your new repositories, which will suppress this warning, call:
힌트:
힌트: git config --global init.defaultBranch <name>
힌트:
힌트: Names commonly chosen instead of 'master' are 'main', 'trunk' and
힌트: 'development'. The just-created branch can be renamed via this command:
힌트:
힌트: git branch -m <name>
/Users/***/git_pjs/.git/ 안의 빈 깃 저장소를 다시 초기화했습니다
요즘 내 깃허브는 플젝업데이트를 안하고있어서 인강 공부용으로 드래그앤드롭 업데이트만 시켜놓고 제대로 연결하거나 관리하지 않음
이제 제대로 연결좀 해보려고 하는데 또다시 떠서 그냥 읽어봄
'Master'는 기본브랜치의 이름이다. 이 디폴트 브랜치명을 바꾸려고 한다.
이 기본브랜치를 네 새로운 레포지토리에 이용하려면 재지정해야하며, 그러면 이 경고는 사라질 것이다.
git config --global init.defaultBranch <name>
이름(name)은 'master' 대신에 대체로 'main', 'trunk', 'development'로 쓰인다.
방금 만든 브랜치는 아래 줄을 이용하여 이름 재지정 가능하다.
git branch -m <name>
깃폴더 안에서 아래 용어 이용하면 바로 해결
git config --global init.defaultBranch main
끝.
728x90