Sunday, July 1, 2018

git add remote upstream




applejack:single_cell_segmentation hqin$ git remote -v 
origin https://github.com/QinLab/single_cell_segmentation.git (fetch)
origin https://github.com/QinLab/single_cell_segmentation.git (push)
$ git remote add upstream https://github.com/opnumten/single_cell_segmentation 
applejack:single_cell_segmentation hqin$ git remote -v
origin https://github.com/QinLab/single_cell_segmentation.git (fetch)
origin https://github.com/QinLab/single_cell_segmentation.git (push)
upstream https://github.com/opnumten/single_cell_segmentation (fetch)
upstream https://github.com/opnumten/single_cell_segmentation (push)


~$ git fetch upstream
remote: Counting objects: 9, done.
remote: Total 9 (delta 6), reused 6 (delta 6), pack-reused 3
Unpacking objects: 100% (9/9), done.
From https://github.com/opnumten/single_cell_segmentation
 * [new branch]      master     -> upstream/master
~$ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
applejack:single_cell_segmentation hqin$ 
applejack:single_cell_segmentation hqin$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean


Reference:
https://help.github.com/articles/configuring-a-remote-for-a-fork/
https://help.github.com/articles/syncing-a-fork/

No comments:

Post a Comment