TLDR
내 저장소(fork) : https://github.com/jayleekr/adas-study-group.github.io
그룹 저장소 : https://github.com/ADAS-study-group/adas-study-group.github.io
0. 로컬에 내 저장소(fork)를 땡겨오자.
이미 했으면 안해도 되는거 아시쥬?
1
2
$ git clone https://github.com/jayleekr/adas-study-group.github.io.git forked_repo
$ cd forked_repo
1. 로컬에 있는 내 저장소(fork)에 remote 설정을 한다.
1
2
3
4
5
6
7
8
$ git remote add upstream https://github.com/ADAS-study-group/adas-study-group.github.io.git
* 확인
$ git remote -v
origin https://github.com/jayleekr/adas-study-group.github.io.git (fetch)
origin https://github.com/jayleekr/adas-study-group.github.io.git (push)
upstream https://github.com/ADAS-study-group/adas-study-group.github.io.git (fetch)
upstream https://github.com/ADAS-study-group/adas-study-group.github.io.git (push)
2. 내 저장소(fork)에 원본 저장소를 병합(merge)한다.
Fetch 먼저
1
2
3
4
5
6
7
8
9
10
$ git fetch upstream
remote: Enumerating objects: 172, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 148 (delta 67), reused 135 (delta 57), pack-reused 0
오브젝트를 받는 중: 100% (148/148), 1.33 MiB | 1.30 MiB/s, 완료.
델타를 알아내는 중: 100% (67/67), 로컬 오브젝트 4개 마침.
https://github.com/ADAS-study-group/adas-study-group.github.io URL에서
* [새로운 브랜치] gh-pages -> upstream/gh-pages
* [새로운 브랜치] master -> upstream/master
Merge ㄱㄱ
1
$ git merge upstream/master
Push ㄱㄱ (fork 저장소로)
1
2
3
4
5
6
7
8
9
$ git push
오브젝트 개수 세는 중: 7, 완료.
Delta compression using up to 24 threads.
오브젝트 압축하는 중: 100% (6/6), 완료.
오브젝트 쓰는 중: 100% (7/7), 1.40 KiB | 1.40 MiB/s, 완료.
Total 7 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/jayleekr/adas-study-group.github.io.git
203f2c0..d7f0922 master -> master
Reference
- https://hyunjun19.github.io/2018/03/09/github-fork-syncing/