技术栈

Git合并多个commit

First Snowflakes2024-02-09 3:03

git rebase -i commitId

假设想要合并最后3个commit, git log显示

commit id 1

commit id 2

commit id 3

commit id 4

则执行git rebase -i commitId4. 注意是4,不是3.

然后,pick最老的commit (commit id 3).

====================================================

https://blog.csdn.net/qiaoqiaoBigBoss/article/details/113729079

上一篇:git命令
下一篇:在 WSL Ubuntu 中安装 SSH 服务器,ssh连接wsl
相关推荐
goodspeed
2 天前
Git Worktree:多分支并行开发的利器
git·github
雮尘
3 天前
让 AI Agent 高效并行开发的命令-git worktree
人工智能·git·agent
南果梨
4 天前
OpenClaw 完整教程!从安装到使用(官方脚本版)
前端·git·开源
Selicens
5 天前
git批量删除本地多余分支
前端·git·后端
闲云一鹤
6 天前
Git LFS 扫盲教程 - 你不会还在用 Git 管理大文件吧?
前端·git·前端工程化
vibecoding日记
9 天前
为什么我就想要「线性历史 + Signed Commits」,GitHub 却把我当猴耍 🤬🎙️
git·编程工具
程序员小崔日记
9 天前
如何将代码轻松上传到 Gitee?Git 使用全攻略!
git·gitee·上传
Bigger
10 天前
为什么你的 Git 提交需要签名?—— Git Commit Signing 完全指南
git·开源·github
DianSan_ERP
11 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
热门推荐
01GitHub 镜像站点02OpenClaw 使用和管理 MCP 完全指南03OpenClaw 连接飞书完整指南:插件安装、配置与踩坑记录04本地部署 OpenClaw + DeepSeek-R1 完全指南05Window 10部署openclaw报错node.exe : npm error code 12806OpenClaw + 飞书(Feishu)环境搭建指南07npm-error code 128问题解决方法08Clawdbot部署教程:解决‘gateway token missing’授权问题的完整步骤09OpenClaw 飞书机器人不回复消息?3 小时踩坑总结10Claude Code + GLM4.7 避坑指南:解决 Unable to connect to Anthropic services