Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- appendChild
- object
- 선택자
- Selector
- 코딩공부
- 연결자
- Let
- function
- 속성선택자
- 복합선택자
- CSS
- padStart
- 상대경로
- 함수
- padEnd
- 공부일지
- 절대경로
- document.querySelector
- 인자
- combinator
- src
- argument
- TiL
- HTMLSTUDY
- HTML
- 결합자
- Append
- const
- advancedwebranking
- 생활코딩
Archives
- Today
- Total
능히 할수있다!
[Git/GitHub]'git init' 입력 시 branch관련 hint가 출력되는 현상 본문
🚧 오류 내용
- 생활코딩 지옥에서 온 Git 진행 중 터미널에 'git init'을 입력하니 아래와 같은 hint가 출력되었다.
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>
🔎 분석
- 기본 Branch 이름을 'master'로 지정하나, 원하는 명칭이 있으면 아래의 코드를 이용하여
'main', 'trunk'등 원하는 이름으로 변경하라고 하는 것으로 확인된다.
git config --global init.defaultBranch <name>
🪄 문제 해결
- 'git init'을 다시 입력해보니 hint가 재출력 되지는 않았지만 위 코드를 이용하여 'main'으로 명칭을 변경해주었다
아래의 코드를 입력하여 defaultBranch를 확인해보니 'main'으로 바뀌었다는 것을 확인할 수 있었다.
git config init.defaultBranch
'STUDY > Git, GitHub' 카테고리의 다른 글
[Git/GitHub] 소스트리로 branch에 commit 시 잔디가 심어지지 않는 현상 (0) | 2023.06.09 |
---|---|
[Git/GitHub] Pull 오류 'fatal: Need to specify how to reconcile divergent branches.' (0) | 2023.06.08 |
[Git/GitHub]소스트리로 commit/push 진행 시 잔디가 심어지지 않는 현상 (0) | 2023.06.06 |
[Git/GitHub] Sourcetree - 'Refreshing Remote Repositories Failed' 오류 해결 (0) | 2023.06.05 |
Comments