问题
I'm using git with android studio and I already sync other repository.
But I hope to change a git repository like github.
I think I need to disconnect already connected to the repository but I don't found this option.
To do that, How can I do?
回答1:
Go to your project directory and delete hidding .git folder like shown below
you will be disconnected to git.

回答2:
We can change the repository url. Just follow the steps.
- 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 :)
回答3:
You can use SmartGit application and set your new git url at "Remote\Properties..." and then push button "Store".
Or you can go to "[project folder]\.git" and edit "config" file. Find line "url = https//[your current url]" and put your new url instead.
来源:https://stackoverflow.com/questions/30586252/how-to-change-git-repository-using-android-studio