(首先下载http://git-scm.com/download/ 工具 ,再给AS配置好Git --> Setting --> Version Control(下的Git) --> Path to git executable --> 选择安装工具下bin里面的git.exe --> test --> Version Control(点击) --> 选出该项目的路径和VCS) 配置工作即完成
①Github操作 --> new respository --> 输入项目名称
②AS操作 --> VCS --> import into Version Control --> Create Git Respository -> 选择该项目
③打开gitBush --> 进入该项目根目录 --> 输入指令(github的意识指令) git remote add origin https://github.com/YOURNAME/PROJECTNAME.git
(注意git push -u origin master 不要输入!!!) 原因探索中,经测试输入了就会关联失败
④AS操作 --> 右键该项目 --> Git --> +add --> 再次右键该项目 --> Git --> Commit Diretory --> commit and push
即可!
更改代码后上传一般顺序是: commit --> pull --> push
参考原博客:http://blog.csdn.net/gao_chun/article/details/49817229