d
Amit DhamuSoftware Engineer
 

Git - Change Remote Origin

1 minute read 00000 views misc

I'm in the process of migrating my Git repositories from Bitbucket to GitLab. Instead of cloning all of my projects from GitLab once they've transferred, here's a way to change the remote origin of the repository if you already have them on your local machine.

git remote rm origin
❯ git remote add origin git@gitlab.com:username/repo.git
❯ git push -u origin --all