你如何使项目与GitHub同步到Android Studio? [英] How do you synchronise projects to GitHub with Android Studio?
问题描述
我试图将我在Android Studio文件夹中的项目同步到GitHub,但我不完全确定除了在选项菜单中添加凭据之外,还需要做什么。有人可以给我一个快速指南吗?
I am trying to synchronise a project that I have on in my Android Studio folder to GitHub, but I am not fully sure what to do other than adding my credentials in the options menu. Could someone give me a quick guide, please?
推荐答案
打开您想在Android Studio中推送的项目。
Open the project you want to push in Android Studio.
点击 VCS - >启用版本控制集成 - > Git
似乎没有办法通过GUI添加远程程序。因此,在项目的根目录中打开Git Bash,并执行 git remote add< remote_name> < remote_url>
There doesn't seem to be a way to add a remote through the GUI. So open Git Bash in the root of the project and do git remote add <remote_name> <remote_url>
现在,当您执行 VCS - >提交更改 - >提交&推
你应该看到你的远程,一切都应该通过图形用户界面。
Now when you do VCS -> Commit changes -> Commit & Push
you should see your remote and everything should work through the GUI.
如果你是得到错误: fatal:remote< remote_name>已经存在
这意味着你已经添加了它。要查看您的遥控器,请执行 git remote -v
和 git remote rm< remote_name>
以移除。
If you are getting the error: fatal: remote <remote_name> already exists
that means you already added it. To see your remotes do git remote -v
and git remote rm <remote_name>
to remove.
详情请参阅以下页面:
http://www.jetbrains.com/idea/webhelp/using-git-integration.html
这篇关于你如何使项目与GitHub同步到Android Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!