我试图同步一个项目,我在我的Android工作室文件夹到GitHub,但我不完全确定要做什么,除了在选项菜单中添加我的凭据。有人能给我简单介绍一下吗?
当前回答
在Android Studio 1.0.2上,你只需要去 VCS->导入到版本控制->共享项目在GitHub。
弹出窗口将出现,要求回购名称。
其他回答
这并不局限于Android Studio,而是Intellij的IDEA的普遍行为。
转到:首选项>版本控制> GitHub
另外请注意,你不需要github集成:标准的git函数应该足够了(VCS > git, Tool Windows > Changes)
这就是我使用Android Studio UI工作的方式:
从项目文件夹中删除。git文件夹。 从所有项目子文件夹中删除。git文件夹。
在Android Studio中打开项目。
设置,版本控制,删除所有根目录
进入VCS,导入到VC,创建git存储库
选择目录
确保您的文件夹是“设置”、“版本控制”中的唯一根目录
进入VCS,导入到VC,在Github上分享项目
如果需要,标记为私人。
选择初始提交的所有文件,包括app文件夹
添加文件,在项目文件夹和应用程序文件夹中选择所有文件。
VCS > Commit ->提交文件。
VCS > Git > Push ->,用于推送文件。
在Android Studio 0.8.2中,你有相同的选项(即在GitHub上共享)。如果你想找到它,你可以使用ctrl+shift+a并在输入文本中输入github。
Github和android studio
/*For New - Run these command in terminal*/
echo "# Your Repository" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/username/repository.git
git push -u origin master
/*For Exist - Run these command in terminal*/
git remote add origin https://github.com/username/repository.git
git push -u origin master
//git push -f origin master
//git push origin master --force
/*For Update - Run these command in terminal*/
git add .
git commit -m "your message"
git push
我第一次添加视频链接来解决你的问题,但我知道这是一个坏主意。这次我简单解释一下。
Android studio与github兼容,但你需要调整一些东西:
Setup Android Studio Setup the Github plugins in the Android Studio settings Android Studio settings >> Plugins page Download the git version control system from this link and setup https://git-scm.com/ After the installation, open Android Studio settings page and select the git.exe settings >> version control >> git Usually the path to git.exe is program files >> git >> bin >> git.exe Go to Settings >> Version control >> Github you will see login and password for your Github account. Apply the settings. For updating the project, go in Android Studio top line click VCS >> enable version control integration >> git One more time VCS >> import into version control >> share project on Github and enter your master password.
现在你可以使用VCS更新按钮将你的项目更新到Github
推荐文章
- 如何在android中获得当前前景活动上下文?
- 如何在Android中获取当前日期?
- 获取Android设备名称
- 在WebView中上传文件
- 加载HTML文件到WebView
- Android:为什么视图没有maxHeight ?
- 如何获得具有已知资源名称的资源id ?
- 在Android上将字符串转换为整数
- 为什么“System.out。”println“工作在Android?
- WebView显示err_cleartext_not_allowed尽管站点是HTTPS
- Android M权限:对shouldShowRequestPermissionRationale()函数的使用感到困惑
- 为什么构建类型与产品风味不同?
- GitHub -致命:无法读取用户名https://github.com':没有这样的文件或目录
- 我如何在一个片段中访问getSupportFragmentManager() ?
- 调试在哪里。Android Studio中的密钥存储库