星空网 > 软件开发 > 操作系统

Android Studio第一次提交git使用

安装:

Git客户端网址:http://git-scm.com/download/

 Android  Studio第一次提交git使用images/loading.gif' data-original="http://images2015.cnblogs.com/blog/585790/201602/585790-20160204170133100-1238146873.png" width="684" height="236" />

根据自己的使用平台下载对应的客户端。这里以Mac系统为例,当客户端软件安装配置完毕后,打开AS的配置面板,找到Git的选项

 Android  Studio第一次提交git使用

在右边的 Path to Git executable 找到Git的可执行程序,点击右边的Test按钮。

 Android  Studio第一次提交git使用

出现下图的提示证明我们已经配置成功。

 Android  Studio第一次提交git使用



我的网络很慢,所以没有用github,而是使用国内git.oscchina.net ,下面是在AS中链接oscchina的过程,我也不是很会,步骤有些繁琐。

先到git.oscchina.net网站上申请个账号,然后创建一个项目。过程不再说了。

 Android  Studio第一次提交git使用

新建工程后,第一次提交

如下图先激活右键Git菜单, 选择 Enable Version Control Integration

 Android  Studio第一次提交git使用

更新:

先要通过pull更新新建的git库里的文件

Android  Studio第一次提交git使用

.gitignore文件无需更新,根据自己本地的文件来

提交:

在下拉框中选择 Git , 点击 OK。

 Android  Studio第一次提交git使用

Module 中的文件都变成了红色。选择项目,右键添加到提交列表中。

 Android  Studio第一次提交git使用

Android  Studio第一次提交git使用

然后再选择 Commit Directory... 

 Android  Studio第一次提交git使用

Commit Message 这里是必填项。点击 Commit 按钮。然后再次如下图选择Push...

(如果选择的时 Commit and Push , 直接跳过下图)

 Android  Studio第一次提交git使用

第一次是需要先设置远程主机的, 将Git@OSC仓库的HTTPS连接拷贝到URL里面。

 Android  Studio第一次提交git使用

最后选择需要提交的项目,点击Push按钮即可。

如果发现提交更新被拒绝的话,可以查找到被拒绝的文件所在的目录中所有的隐藏文件夹.git ,  然后删除即可。




原标题:Android Studio第一次提交git使用

关键词:Android

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

shopee批量上架:https://www.goluckyvip.com/tag/25060.html
shopee评论:https://www.goluckyvip.com/tag/25067.html
shopee前台:https://www.goluckyvip.com/tag/25068.html
Shopee全球类目树功能:https://www.goluckyvip.com/tag/25069.html
克罗地亚船厂:https://www.goluckyvip.com/tag/2507.html
shopee日本站:https://www.goluckyvip.com/tag/25070.html
2022世界杯门票如何买?:https://www.vstour.cn/a/363182.html
沈阳到本溪的距离有多远?(详细路线及交通方式):https://www.vstour.cn/a/363183.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流