找到git提交“重写”档 [英] Find git commits that "rewrite" files
问题描述
I noticed this line after I committed something just now:
[master 6c15628] <Commit message>
1 files changed, 49 insertions(+), 44 deletions(-)
rewrite <filename> (63%)
我认为非常酷,git知道我重写了这个文件,重写< filename>(63%)
部分)。这让我更感兴趣。是否有任何git命令来获取所有提交/文件的列表,已经被git的标准重写?
Which I think is really cool, that git knew that I rewrote that file (i.e., the rewrite <filename> (63%)
part). This has me more interested. Is there any git command to get a list of all commits/files that have been "rewritten" by git's standards?
推荐答案
Git并没有真正的标准;这仅仅是一个用户界面演示启发式。它在这一点上的输出可能会因版本或版本,或基于各种其他条件而有所不同。
Git doesn't really have a standard; this is just a UI presentation heuristic. Its output on this point might vary from version or version, or based on various other conditions.
如果你愿意,你可以编写一个脚本来使用Git的相似索引您指定的某个阈值列出您感兴趣的信息。
If you wanted, you could probably write a script that used Git's similarity index with some threshold you specify to list the information you're interested in.
这篇关于找到git提交“重写”档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!