git - git: see the parent commit of a squash merge
问题描述
lets say I have the following graph
master A------D
\
feature B--C----E
If D
is a squash-merge of feature
at commit C
, but then a new commit (E
) is pushed to feature
, there is no obvious link between commit D and the exact commit that was merged into master
.
My question is whether it is possible to retrieve this link. Is there a git command that can be run that will, for a squash-merge, return the commit hash of the exact commit that was squashed in?
NOTE: The commit message was changed in my repo, so the fact that by default git will record the commit hashes that are squashed in the message is not useful
解决方案
你告诉 Git 不要记录合并,然后抹去它提供的关于没有记录它的自我说明。就是这样,你已经找到了 Git 的所有合并记录,并告诉它销毁它们。
推荐阅读
- python - 绘制问答模型的结果需要什么
- c - 如何正确地将 ATMEL 汇编文件添加到 C 项目中
- flash - 如何使用 Adobe Flash Debugger 解决错误 2035?
- c# - 如何从 c# 打开“Active Directory 用户和计算机”对象属性对话框?
- java - Spring Boot - 运行项目错误:等待获取守护进程地址注册表上的共享锁
- python - 基于标签停止实例的 Lambda Boto3 程序
- python - Python - 获取满足函数大于 0 的产品组合的完整列表
- javascript - JS 代码(Chrome 开发工具)仅在 Instagram 标签搜索上显示视频
- c# - 为什么 LINQ 查询会影响原始列表?
- c++ - 这两种方式有什么区别?