Mac系统下,在android studio中使用Github版本管理

1、下载并安装github客户端http://git-scm.com/download/ 

2、打开android studio,测试github是否使用ok

点击“test”,如果弹出下述窗口,这说明github安装成功。

很不幸,我第一次点击时弹出提示

“Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo”

在网站http://www.css88.com/archives/5183 以及http://mynameispagewood.com/web-development/osx-mavericks-git-error/ 找到了解决的办法,在命令中输入命令:

  1. sudo xcodebuild -license

This allowed me to view the X-code licence, and then agree to the terms. Voila, that’s it. Everything worked just fine after that.

重新打开android studio,重新点击“test”,测试ok

3、在android studio中输入已经创建好的账号和密码

同样,测试是否OK

4、第一次上传本地工程到github

VCS->import into version control->share project on github

接下来不要修改什么,直接默认ok即可

5、更新代码到github

右键module,Git

如果有要增加的文件,选择add

如果有要修改的文件,选择commit directory

最后的时候,一定要记得push,将修改的地方更新到github服务器






posted @ 2016-01-04 11:40  风倾清凌  阅读(2987)  评论(0编辑  收藏  举报