Suppose I read an answer such as this one which tells me that the command I want is
git fetch <remote> <sourceBranch>:<destinationBranch>
How do I know what to fill in as <remote>
?
I think the simple answer is that it is always the word origin
. I think it would only be something other than origin
if I had done something special to set up a repo with multiple simultaneous upstreams, or if I had done something special to set up a repo with an upstream named something other than the default origin
. (I further suspect that these "doing something specials" are so rarely done in actual practice that the rule, "it's always origin
" really is almost universally true. But that's what I'm trying to figure out here.)
I'm unclear whether that magic word origin
is a keyword that implicitly expands to whatever this repo's upstream is named, or if origin
is the default name that's always chosen for a new repo's upstream, or what.