Git Commands - VishalPatangay/My-devops-repo GitHub Wiki
-
A remote is a Git repository where team members collaborate (like a repository on GitHub). git remote -v - lists all the remotes that a user has. Output: origin https://github.com/username/mslearn-tailspin-spacegame-web.git (fetch) origin https://github.com/username/mslearn-tailspin-spacegame-web.git (push)
-
Origin specifies your repository on GitHub. When you fork code from another repository, it's common to name the original remote (the one you forked from) as upstream.
-
Run this git remote add command to create a remote named upstream that points to the Microsoft repository: git remote add upstream https://github.com/MicrosoftDocs/mslearn-tailspin-spacegame-web.git
-
git remote -v output: this will list the new forked repository you have just added. Note that the last one only have a fetch permission for you and no push as the origin. origin https://github.com/username/mslearn-tailspin-spacegame-web.git (fetch) origin https://github.com/username/mslearn-tailspin-spacegame-web.git (push) upstream https://github.com/MicrosoftDocs/mslearn-tailspin-spacegame-web.git (fetch)