1、查看分支
git branch -a
2、创建本地分支
git checkout -b 分支名
3、关联本地分支与远程分支
git push -u origin 分支名
4、添加文件到“暂缓区”
git add 文件名
注意:不要add .
5、提交暂缓区文件致本地仓库
git commit -m '本次提交的说明'
6、提交本地仓库代码到远程仓库
git push origin 分支名
其他的命令
git checkout 分支名 切换分支