环境准备
Github账号:已有
本地Git :已安装
操作步骤:
Github:
1. 在Github上创建一个新的repository,名字可以随意取,但是建议尽量不要包含中文
2. 点击create repository创建成功,如下图所示:
本地:
3.在要上传项目的根目录执行如下操作:
cd /Users/xxx.xxx/uiautotest # 进入项目根目录
git init # 初始化本地仓库
git add * # 添加全部代码到本地仓库
git commit -m "first commit" # 提交到本地缓存
git branch -M master # 在本地创建master分支
git remote add origin https://github.com/luonan211/uiautotest.git #提交到远程github
git push -u origin master # push 到github的master分支上
4.项目上传成功后,如图所示: