git: Pulling from master

Willem Ferguson willemferguson at zoology.up.ac.za
Fri Nov 17 01:59:01 PST 2017


I am  sorting out the Github mechanism for myself.

Two questions:

1) The upstream repository. Currently there are two such repositories:

i) git://subsurface.hohndel.org/subsurface.git  [git has the label "origin"]

ii) https://github.com/Subsurface-divelog/subsurface [git has the label 
"upstream"]

What is the current relationship between these two repositories?

I assume I should only be concerned with the github upstream.

If I do:

$ git remote -v

I get:

fork    https://github.com/willemferguson/subsurface (fetch) [this comes 
from doing git remote add fork 
https://github.com/willemferguson/subsurface ]
fork    https://github.com/willemferguson/subsurface (push)
origin    git://subsurface.hohndel.org/subsurface.git (fetch)
origin    git://subsurface.hohndel.org/subsurface.git (push)
upstream    https://github.com/Subsurface-divelog/subsurface (fetch)
upstream    https://github.com/Subsurface-divelog/subsurface (push)

2) I gather, to sync my fork on Github with upstream, I fetch the 
upstream master into the local copy on my laptop, then I push from my 
local copy to the forked version in my own Github account. Then the fork 
in my github account is synced with the upstream master.

If I have no changes of my own in my local copy, I can pull from 
upstream master into my own laptop copy and push to the fork on Github. 
Dirk's on this topic email warns against doing a fetch followed by merge 
at this stage.

git checkout upstream/master [I get message error: pathspec 
'upstream/master' did not match any file(s) known to git ]

git pull upstream/master  [error: fatal: 'upstream/master' does not 
appear to be a git repository]

git push fork/master

# [ Now sync is also done ]

Comment or insults on my stupidity, please?

Kind regards,

willem






-- 
This message and attachments are subject to a disclaimer.
Please refer to 
http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf for full 
details.


More information about the subsurface mailing list