首先用 git log查看一下当前分支的commit;

git将多个commit合为一个commit命令操作

黄色框为要合的commit 

这时候就要使用

git rebase -i 红色框的commit id

然后修改,将不要的commit 的pick选项改为s

最后强制push到远端的某个分支

git push -f {远端的某个分支}


相关文章:

  • 2021-08-24
  • 2021-06-24
  • 2021-09-16
  • 2022-12-23
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2021-10-24
  • 2022-01-23
  • 2021-07-07
  • 2021-09-13
  • 2021-09-21
相关资源
相似解决方案