git 新建分支并提交本地代码到远程分支

在本地新建分支:

git branch newbranch

将本地分支push到远程:

git push origin newbranch

切换至该分支:

git checkout newbranch

查看状态:

git status

添加本地修改:

git add .

commit:

git commit -m 'XXXX'

push代码:

git push

Leave a comment

Your email address will not be published. Required fields are marked *