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 |
Tags
- Inorder Traversal
- pulloff
- scowl
- Knowledge Distillation
- objective functions for machine learning
- rest-api
- fastapi
- freebooze
- Policy Gradient
- Excel
- model-free control
- shadowing
- normalization
- straightup
- REINFORCE
- 3d medical image
- resample
- domain adaptation
- sidleup
- noise contrast estimation
- loss functions
- remove outliers
- checkitout
- MRI
- 자료구조
- thresholding
- non parametic softmax
- sample rows
- clip intensity values
- Actor-Critic
Archives
- Today
- Total
Let's Run Jinyeah
Git Push 실패 - Pull & Fetch & Merge 본문
Error - failed to push some refs to <remote github>
-
remote repository(github)에 나의 local repository에 없는 commit이 존재
- 팀원이 github에 새로운 수정사항을 반영한 경우
C:\mirror>git push -u origin main
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to <remote github>
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
해결 - pull or (fetch & merge)
-
git pull - remote repository의 내용을 working directory에 반영
-
remote repository내용을 가져와 자동으로 merge까지 한다.
-
-
get fetch - remote repository의 내용을 local repository에 반영
-
단순히 remote repository의 내용을 확인만 하고 로컬 저장소와 병합은 하지 않는다.
-
fetch 결과는 remote pository의 최신 커밋을 이름 없는 브랜치(FETCH_HEAD)로 가져온다.
-
git merge를 통해 branch들 간의 내용을 결합
-
git pull origin main
# fatal: refusing to merge unrelated histories
git pull origin main --allow-unrelated-histories
'Programming > Git&Github' 카테고리의 다른 글
로컬 저장소를 새로운 Github 저장소에 등록 (0) | 2021.02.11 |
---|---|
Git Merge 충돌 해결 단계 (0) | 2021.02.11 |
Git reset & checkout & ignore (0) | 2020.02.03 |
Git Branch & Merge (0) | 2020.02.03 |
Git add & commit & push & 상태확인 (2) | 2020.01.10 |
Comments