[英]How to transfer git repo from Bitbucket to Github in Android Studio?
So I have an Android Studio project that I have on Bitbucket that I'm having trouble moving to Github. 因此,我在Bitbucket上有一个Android Studio项目,但无法迁移到Github。 So far I've imported the project to Github using its import feature and changed the origin using "git remote set-url".
到目前为止,我已经使用导入功能将项目导入到Github,并使用“ git remote set-url”更改了来源。 Now every time I try to push & commit using Android Studio I get the error "fatal: Could not read from repository".
现在,每次我尝试使用Android Studio推送并提交时,都会出现错误“严重:无法从存储库读取”。 Also I don't know if it has anything to do with the problem but I have tried to change the SSH executable from built-in to native.
另外,我不知道是否与问题有关,但我尝试将SSH可执行文件从内置更改为本地。
Edit: To clarify, the problem I'm having is committing and pushing using Android Studio. 编辑:澄清一下,我遇到的问题是使用Android Studio提交和推送。 Everything works fine if I use git commands but when I use the Android Studio interface the "fatal: Could not read from repository" error pops up.
如果我使用git命令,一切正常,但是当我使用Android Studio界面时,弹出“致命:无法从存储库读取”错误。
I suggest creating separate remotes rather than changing the URL for origin
. 我建议创建单独的遥控器,而不要更改
origin
URL。 For example, you can do 例如,您可以
git remote add bitbucket <URL for BitBucket repo>
git remote add github <URL for GitHub Repo>
Now you can pull and push from each remote as you wish. 现在,您可以根据需要从每个遥控器中拉动和推动。 For example
例如
git checkout master
git pull bitbucket master
git push github master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.