Git创建分支并提交代码

step1,在本地新建分支

git branch newbranch

step2:把本地分支push到远程

git push origin newbranch

step3:切换到该分支

git checkout newbranch

step4:查看本地修改

git status

step5:添加本地修改

git add .

step6:commit修改

git commit -m ‘XXXX’

step7:push代码

git push

完毕

猜你喜欢

转载自blog.csdn.net/roczheng1990/article/details/82018568