- 初始化本地库
bash
git init
- 创建本地分支,需要和github分支名字一样
bash
git checkout -b master
- 本地仓库连接远程仓库
bash
git remote add origin 自己的仓库地址
- 云仓库代码同步到本地
bash
git pull origin master
- 上传代码
bash
git push -u origin master