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

推荐订阅源

V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
L
LangChain Blog
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
Y
Y Combinator Blog
月光博客
月光博客
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
小众软件
小众软件
H
Help Net Security
Last Week in AI
Last Week in AI
B
Blog RSS Feed
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium
博客园 - 叶小钗
The GitHub Blog
The GitHub Blog

博客园 - 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