写一个从master上新建分枝,在新分枝上提交并且合并到master代码推送到远程

直接git push origin master会报Everything up-to-date

所以先新建分支,在新分枝上完成新增提交之后合并到master分枝上,并且上传到远程

第一步、git init 

第二步、git branch newBranch

第三步、git checkout newBranch

第四步、git add .

第五步、git commit -m "这是newBranch的10-30号的修改"

第六步、git status

第七步、git checkout master

第八步、git merge newBranch

第九步、git diff

第十步、git push -u origin master

第十一步、git push -u origin master:div

相关操作:git branch -a  //查询所有的分枝

    git pull origin master//拉项目

    git remote add origin ----项目ssh  //创建远程库

    git remote rm origin//移除远程库

原文地址:https://www.cnblogs.com/w123w/p/13900441.html