Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+2 votes
in DevOps and Agile by (29.3k points)
edited by

What is the difference between origin and upstream on GitHub?

When a git branch -a command is done, some branches have a prefix of origin (remotes/origin/..) while others have a prefix of upstream (remotes/upstream/..).

1 Answer

+1 vote
by (50.2k points)

Original definition from the documentation:

When a repo is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from.

To keep track of the original repo, you need to add another remote named upstream

Upstream generally refers to the original repo that you have forked

(see also "Definition of “downstream” and “upstream” " from:

Origin is your fork: your own repo on GitHub, a clone of the original repo of GitHub

Related questions

Browse Categories