git学习(3)----git 新建分支并提交本地代码到远程分支

 

一、步骤

1、在gitlab上创建一个branch,然后在这个

二、网上步骤

转载:https://blog.csdn.net/qq_33829154/article/details/81364989

step1,在本地新建分支

git branch newbranch

step2:把本地分支push到远程

git push origin newbranch

step3:切换到该分支

git checkout newbranch

step4:查看本地修改

git status

扫描二维码关注公众号,回复: 6432333 查看本文章

step5:添加本地修改

git add .

step6:commit修改

git commit -m 'XXXX'

step7:push代码

git push

完毕

猜你喜欢

转载自www.cnblogs.com/Lee-yl/p/11009467.html