git fetch origin
git reset --hard origin/master
git: Your branch and 'origin/master' have diverged - how to throw away local commits?
I have the following message in git: # Your branch and 'origin/master' have diverged, # and have 3 and 8 different commits each, respectively. # (use "git pull" to merge the remote branch into ...
stackoverflow.com
- 좀 더 구체적이고 친절한 설명
master branch and 'origin/master' have diverged, how to 'undiverge' branches'?
Somehow my master and my origin/master branch have diverged. I actually don't want them to diverge. How can I view these differences and merge them?
stackoverflow.com
'Coding > git' 카테고리의 다른 글
GitHub: How to make a fork of public repository private? (0) | 2021.03.29 |
---|---|
Github 비밀번호 입력 없이 pull/push (ssh key 설정) (0) | 2021.02.11 |
git 편집 에디터 바꾸기 (nano to vim) (0) | 2020.10.01 |
git branch 이용, 생성, 삭제 (0) | 2020.05.14 |
git revert - 커밋 변경, reset/revert 복구하기 (0) | 2020.05.14 |