版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.youkuaiyun.com/lwz622/article/details/83828335
首先,先查看自己所在分支上是否有没有上传的修改处:git branch;如若没有,则直接可以创建并且换到所创建的分支目录。
GIT创建分支以及上传服务器
git checkout -b xxxxxx
查看分支:git branch
1,创建+切换分支:git checkout -b xxxxxx
2,合并某分支到当前分支:git merge xxxxxx
3,删除分支:git branch -d xxxxxx
4,上传服务器:git push origin xxxxxx:xxxxxx 主要的还是操作1和4步
推送本地分支local_branch到远程分支 remote_branch并建立关联关系
a.远程已有remote_branch分支并且已经关联本地分支local_branch且本地已经切换到local_branch
git push
b.远程已有remote_branch分支但未关联本地分支local_branch且本地已经切换到local_branch
git push -u origin/remote_branch
c.远程没有有remote_branch分支并,本地已经切换到local_branch
git push origin local_branch:remote_branch