Mid Version Control

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