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

具体各步骤命令

提交之后代码分支图

Git