git remote add origin https://github.com/user/repo.git

Category: Git - Core

git remote add origin https://github.com/user/repo.git

Add a new remote named origin

Adds a new remote connection named 'origin' pointing to a GitHub repository URL.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.