안녕하세요?
github에서 fork한 repository를 최신으로 동기화하는 방법을 살펴보도록 하겠습니다.
먼저 remote url 확인
$ git remote -v
origin https://github.com/frozenrainyoo/settings (fetch)
origin https://github.com/frozenrainyoo/settings (push)
upstream 추가
fork한 부모 repository 주소를 remote에 등록합니다.
$ git remote add upstream https://github.com/jglee1027/settings
remote 다시 확인
$ git remote -v
origin https://github.com/frozenrainyoo/settings (fetch)
origin https://github.com/frozenrainyoo/settings (push)
upstream https://github.com/jglee1027/settings (fetch)
upstream https://github.com/jglee1027/settings (push)
fetch upstream
$ git fetch upstream
remote: Enumerating objects: 189, done.
remote: Counting objects: 100% (189/189), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 814 (delta 187), reused 188 (delta 187), pack-reused 625
Receiving objects: 100% (814/814), 150.02 KiB | 0 bytes/s, done.
Resolving deltas: 100% (226/226), completed with 26 local objects.
From https://github.com/jglee1027/settings
* [new branch] master -> upstream/master
origin/master에 upstream/master를 머지합니다.
$ git merge upstream/master
끝 입니다.
반응형
'개발일지 > CI & CD - Git, Jenkins' 카테고리의 다른 글
Git - PR 반영시 지워진 브랜치 쌓여있는 문제, prune 옵션 사용 (0) | 2021.06.10 |
---|---|
Git - Encoding, Line Ending 오류 해결 방법 (0) | 2021.04.22 |
lefthook 설치하여 사용하는 방법 - Flutter 정적분석 (0) | 2021.02.15 |