Change git remote repository

1

I'm using an online tool to do version control with git but would like to change the tool once I've added a repository to the project.

How to change the remote repository (commonly called origin ) using git as version control.

    
asked by anonymous 05.02.2016 / 00:50

2 answers

2

There are a few different answers to this question, but the one that best suited the situation was this:

git remote rm origin
git remote add origin novo_repositório_a_ser_apontado.git

Source: Stack Overflow

    
05.02.2016 / 00:50
0

You can remove

git remote remove origin

add a new one with the new address

git remote add origin git://suaUrl

Changing the remote directory

git remote set-url origin git://suaUrl

Or you can rename the current one and add a new one.

git remote rename origin old-origin

git remote add origin novaurl

    
24.12.2018 / 17:41