git查找重复的提交(通过patch-id) [英] git finding duplicate commits (by patch-id)

查看:389
本文介绍了git查找重复的提交(通过patch-id)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个寻找重复变化的配方。
patch-id可能是相同的,但提交属性可能不是。



这似乎是patch-id的使用目的: p>


git patch-id --help



IOW,你可以用这个东西来查找可能的重复提交。


我想象一下将git log,git patch-id和uniq
可以很好地完成这项工作,但如果有人有一个能够完成
工作的命令,我会很感激。

解决方案

因为重复的更改很可能不在同一个分支上(除非它们之间存在还原),您可以使用 git cherry

  git cherry [-v] [< upstream>并[d头> [< limit>]]] 

其中上游将是检查头部中的更改副本的分支。


I'd like a recipe for finding duplicated changes. patch-id is likely to be the same but the commit attributes may not be.

This seems to be an intended use of patch-id:

git patch-id --help

IOW, you can use this thing to look for likely duplicate commits.

I imagine that stringing together "git log", "git patch-id" and uniq could do the job badly but if someone has an command that does the job well, I'd appreciate it.

解决方案

Because the duplicate changes are likely to be not on the same branch (except when there are reverts in between them), you could use git cherry:

git cherry [-v] [<upstream> [<head> [<limit>]]]

Where upstream would be the branch to check for duplicates of changes in head.

这篇关于git查找重复的提交(通过patch-id)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆