使用Android Studio 上传项目到github(非Gi
2017-01-24 本文已影响137人
半盏茶灯
网上看到不少都是使用命令方式上传项目到github,最近看到一篇文章写的非命令方式感觉不错,尝试成功后也搞个小总结。废话不多说,直接进入主题。
1. 安装git,配置git
- 没有安装的先安装,官网下载地址:https://git-scm.com/download
- 安装后在android studio配置git。

2. android studio配置github
Test成功,后面才能上传项目。

3.创建本地git仓库
- 先创建android studio项目。
-
给该项目创建仓库,创建的时候要设置仓库路径。
1.选择创建仓库
2.设置仓库路径
- 设置完后,记得检测 .gitignore 文件,我的.gitignore的内容:
*.iml
/.gradle
/.idea
/local.properties
.DS_Store
/build
local.properties
/captures
.externalNativeBuild
-
add文件.然后提交到本地仓库
add文件

3.上传项目到远程仓库(github)


到这一步就提交成功了,比如我的项目地址:https://github.com/qule510/MyAndroidDemos.git