git 如何在 Android Studio 中删除存储库并添加新存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30739519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to delete a repository and add a new one in Android studio?
提问by Sumod Kulkarni
I was working with VCS enabled in Android Studio and pushed my code to a repository that I had created in BitBucket. However, now the team I'm working with has created a new repository also on BitBucket and I have to switch my entire project there. So how do I stop VCS in my current project, and push code to a new repoositroy with a new link from scratch?
我在 Android Studio 中启用了 VCS,并将我的代码推送到我在 BitBucket 中创建的存储库。但是,现在与我合作的团队也在 BitBucket 上创建了一个新的存储库,我必须在那里切换我的整个项目。那么如何在当前项目中停止 VCS,并从头开始使用新链接将代码推送到新的存储库?
Also, in the first repository that I was working with only the "java" folder was pushed and not the rest. Now in the new repository I want to be able to commit and push changes made in all other files as well like "res" etc.
此外,在我使用的第一个存储库中,只推送了“java”文件夹,而不推送其他文件夹。现在在新的存储库中,我希望能够提交和推送在所有其他文件以及“res”等中所做的更改。
回答by Sivakumar
U can remove connection from git repository.
您可以从 git 存储库中删除连接。
step 1 :Open git bash.
第 1 步:打开 git bash。
step 2 : navigate to the master folder. '
第 2 步:导航到主文件夹。'
step 3 : $ git remote rm origin
第 3 步:$ git remote rm origin
The git remote will now be removed from the repository.
git remote 现在将从存储库中删除。
Now u can add new connection by using VCS->Git->+add.
现在您可以使用 VCS->Git->+add 添加新连接。