git将多个commit合为一个commit命令操作
首先用 git log查看一下当前分支的commit;
黄色框为要合的commit
这时候就要使用
git rebase -i 红色框的commit id
然后修改,将不要的commit 的pick选项改为s
最后强制push到远端的某个分支
git push -f {远端的某个分支}
首先用 git log查看一下当前分支的commit;
黄色框为要合的commit
这时候就要使用
git rebase -i 红色框的commit id
然后修改,将不要的commit 的pick选项改为s
最后强制push到远端的某个分支
git push -f {远端的某个分支}