Skip to content

How to add a Git remote

Today I had to add a remote to a Git repository after deleting the Git remote with git remote rm origin, for reasons that I won’t bore you with.

Then I added a new Git remote to a GitHub repository with

git remote add origin [email protected]:flaviocopes/myrepo.git

Change flaviocopes/myrepo to your GitHub URL.

Done!


→ Here's my latest YouTube video

→ I wrote 17 books to help you become a better developer, download them all at $0 cost by joining my newsletter

JOIN MY CODING BOOTCAMP, an amazing cohort course that will be a huge step up in your coding career - covering React, Next.js - next edition February 2025

Bootcamp 2025

Join the waiting list