DEV Community

Discussion on: A List of Essential Git Queries

schmitzel76 profile image
Patrick Schmitz

Using standard conventions, origin points to the repository you've cloned, and upstream points to the repository you have forked from. Origin is created automatically when cloning, and upstream should be created manually.

In your example, you let upstream point it to the cloned remote repository, which makes origin and upstream reference the same remote repository, which can lead to confusion. You could just remove the section about adding the upstream remote as you don't use it in the examples anyway.

chaitanya4vedi profile image
Chaitanya Chaturvedi Author • Edited on

Thank you for the correction. I can't remember why I added that but as you pointed out it was incorrect and unnecessary at the same time. Thank You.