惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
H
Help Net Security
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Y
Y Combinator Blog
M
MIT News - Artificial intelligence
D
Docker
A
About on SuperTechFans
Vercel News
Vercel News
腾讯CDC
C
Check Point Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
J
Java Code Geeks
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
量子位
MongoDB | Blog
MongoDB | Blog
博客园 - 司徒正美
博客园_首页
月光博客
月光博客
U
Unit 42

博客园 - MvloveYouForever

添加gitignore mac安装小龙虾 flutter重新学习 uniapp简单移动端H5电脑端适配方案 添加ssh后,ssh-rsa fatal: Could not read cordova打印插件备注 H5开发类似rpx实现方法 maven仓库地址 idea与其他软件激活办法 linux常用命令总结 Command line is too long mysql安装教程备份 mybatis-plus 条件参数说明 关于打包electron应用 关于spring unicloud短信不能用 关于mybatis 关于maven vue2 和 vue3的区别 父子组件v-modle,vue2和vue3的区别 Vue3知识点
git合并提交
MvloveYouForever · 2024-11-26 · via 博客园 - MvloveYouForever

1 例如有 1,2,3,4 四次提交。 想要合并  2,3,4。

命令:

git rebase -i '第1次commitid'

2 此时跳出编辑模式

// 第一条不能设置成s
pick commitid   第2次
s commitid   第3次
s commitid   第4次

3 如果编辑没有问题

  则弹出设置 commit 信息的 编辑模式

此时直接设置最终要显示的 commit 信息即可

4  #  rebase 完成,推送到远程分支

// 注意此操作会强行覆盖远程分支
// 所以在rebase命令之前,需先pull最新代码解决冲突之后,再强制提交
// 而且在强制提交之前,确保服务端仓库在上次pull之后没有更新新的内容
git push origin <your-branch-name> --force