We can change the repository url. Just follow the steps.
In Android Studio Arctic Fox | 2020.3.1
- Right click on project folder
- From menu Choose “Git”
- Then chosse “Manage Remotes…”
- Now, select the existing “origin” and click on edit
- Enter your new URL and click OK
For Android Studio Older versions
- Right click on project folder
- From menu Choose “Git”
- Choose “Repository”
- Choose “Remotes…”
- Now you got the “Git Remotes” popup
- You can edit the existing url or remove the old url and then add new url.
- Click “OK”. that’s it. Now you are connected with new repo. But branches are not connected. Just follow few steps to complete.
- Try to pull the changes from repo “Git > Repository > Pull…”
- Now you got the “Pull Changes” popup. Click “Refresh” button.
- After successfully reconnected with repo then you can see the branches of new repo under “Branches to merge” box.
- Done. Now you are connected with new repo & branches.
Happy Coding 🙂