git提交时报错Your branch is up to date with 'origin/master'
git提交时报错:Your branch is up to date with ‘origin/master’原因是版本分支的问题。解决办法参考博客理论分析参考小结:新建一个分支git branch newbranch查看分支git branch切换到新建分支git checkout newbranch在新分支提交git add .git c...
·
git提交时报错:Your branch is up to date with ‘origin/master’
原因是版本分支的问题。
小结:
- 新建一个分支
git branch newbranch
- 查看分支
git branch
- 切换到新建分支
git checkout newbranch
- 在新分支提交
git add .
git commit -m "提交"
- 切回主分支
git checkout master
- 将新分支提交的改动合并到主分支上
git merge newbranch
- 然后就可以在主分支push代码了
git push -u origin master
- 最后可以删除新建的分支
git branch -d newbranch
更多推荐
所有评论(0)