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
- HTMLSTUDY
- appendChild
- document.querySelector
- src
- advancedwebranking
- 생활코딩
- 상대경로
- Let
- object
- 공부일지
- combinator
- 선택자
- 절대경로
- const
- function
- CSS
- 속성선택자
- 코딩공부
- padStart
- 연결자
- argument
- 함수
- HTML
- padEnd
- 인자
- Append
- 결합자
- 복합선택자
- Selector
- TiL
Archives
- Today
- Total
능히 할수있다!
[Git/GitHub] Pull 오류 'fatal: Need to specify how to reconcile divergent branches.' 본문
STUDY/Git, GitHub
[Git/GitHub] Pull 오류 'fatal: Need to specify how to reconcile divergent branches.'
능히버섯와나 2023. 6. 8.
🚧 오류 내용
- git에서 pull을 진행하려는데, 아래와 같은 오류가 발생했다.
From https://github.com/xx
* branch main -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint:
hint: git config pull.rebase false # merge
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.
🔎 분석
git config pull.rebase false # merge
git config pull.rebase true # rebase
git config pull.ff only # fast-forward only
- 직역하면 분기를 조정하는 방법을 지정하라고 하는데, hint를 보면 pull 방식을 지정하라는 의미인 것을 알 수 있으며,
위와 같이 merge, rebase, fast-forward only 3가지 방법을 제시하고 있다.
merge: 새 branch에서 작업한 내용을 기존 main branch의 히스토리를 유지하면서 main branch에 병합하는 것
rebase: 기본 branch base자체를 재설정하여 commit을 재적용 하는 것으로 히스토리 또한 그에 맞게 변경 됨
fast-foward only: branch를 나눠 작업하는 동안 main branch에서 작업한 내용이 없을 경우에만 빠른 병합 가능
Git - Rebase 하기
Git에서 한 브랜치에서 다른 브랜치로 합치는 방법으로는 두 가지가 있다. 하나는 Merge 이고 다른 하나는 Rebase 다. 이 절에서는 Rebase가 무엇인지, 어떻게 사용하는지, 좋은 점은 뭐고, 어떤 상황에
git-scm.com
🪄 문제 해결
- 위에서 설명한 3가지의 방법(merge, rebase, fast-forward only)중 자신에게 맞는 명령어를 사용 후 pull을 진행하면 되나,
main branch에 손을 대는 rebase 방식은 충돌 등에 유의해야 한다.
'STUDY > Git, GitHub' 카테고리의 다른 글
[Git/GitHub] 소스트리로 branch에 commit 시 잔디가 심어지지 않는 현상 (0) | 2023.06.09 |
---|---|
[Git/GitHub]소스트리로 commit/push 진행 시 잔디가 심어지지 않는 현상 (0) | 2023.06.06 |
[Git/GitHub] Sourcetree - 'Refreshing Remote Repositories Failed' 오류 해결 (0) | 2023.06.05 |
[Git/GitHub]'git init' 입력 시 branch관련 hint가 출력되는 현상 (0) | 2023.06.05 |
Comments