Change repository linked with android project in Git

Asked

Viewed 1,491 times

2

Good morning, I created a project in Android Studio, created a repository in Git, did the Share of my project in my repository.

Now, I’d like to switch repositories, take this project of mine that’s already linked and make it link to another repository.

How do I change my repository project in Android Studio or otherwise.

  • You just want to change the remote repository, that’s all?

1 answer

3


To change the repository remote in the shell:

$ git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

To see the current url

$ git remote -v
origin https://github.com/USERNAME/OTHERREPOSITORY.git (fetch)
origin https://github.com/USERNAME/OTHERREPOSITORY.git (push)

I hope I’ve helped

Source https://help.github.com/articles/changing-a-remote-s-url/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.