Mid From PDF Version Control Git & GitHub

Explain the difference between origin and upstream.

  • origin – The main remote repository you cloned or own.
  • upstream – Usually refers to the original repository that your fork came from.

Example:

If you fork a popular open-source project:
  • Your fork on GitHub = origin
  • The original repo (the one you forked from) = upstream

Commands to set both:

git remote add origin

git remote add upstream

Why it matters:

This setup lets you pull new changes from the main project (upstream) while pushing your

changes to your fork (origin).

More from Developer Essentials

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details