git rebase

创建新分支修改场景

第一步先执行: git checkout newbranch

第二步执行: git rebase master

// 执行代码操作

第三步: git checkout master

第四步: git merge newbranch

已经修改过场景:

执行代码操作以后

第一步:git add .

第二步:git commit
// 输入提交信息

第三步: git rebase master

第四步: git checkout master

第五步: git merge newbranch

具体各步骤命令

提交之后代码分支图


如果有错误的地方,还望各位多多指点
写个博客,来记录自己成长的一些经历,或许也能顺便帮助他人。
原文地址:https://www.cnblogs.com/Katakana/p/14736243.html