git添加新分支

1.查看分支

git branch

2.checkout出代码到分支test

git checkout -b test

3.添加到缓存

git add .

4.添加到本地库

git commit -m 'test commit !'

5.提交远程git

git push origin test

大功告成!

如果需要删除本地分支

git branch -d test即可

原文地址:https://www.cnblogs.com/xieyang-yang/p/10767430.html