Synchronize the git fork repository
to the latest version of origin repository
● 원본 repository 에서 업데이트된 부분을 받아올 때
$ git remote -v
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
$ git remote add upstream
https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
$ git remote -v
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)
$ git fetch upstream
* [new branch] master -> upstream/master
$ git checkout master
$ git merge upstream/master
$ git push origin master
[참조] https://json.postype.com/post/210431
'Computer Science > Git' 카테고리의 다른 글
[Git] Git 되돌리기 Reset & Revert (0) | 2019.05.16 |
---|---|
[git error] Your local changes to the following files would be overwritten by merge (0) | 2018.08.20 |
git command (0) | 2018.08.20 |
Git Error - Another git process seems to be running in this repository (0) | 2018.04.23 |
[Git] Git & Github (0) | 2017.12.26 |
댓글