[英]What's the difference between “git log --diff-filter=R” and “git log --find-renames”?
[英]For git log, the difference between options of --follow and --find-renames
假設我只需要處理一個文件。 從git-log手冊頁來看,似乎我應該使用--follow。 令我感到困惑的是,對於--find-renames,我可以在相似性索引上指定閾值,而--follow沒有這樣的閾值。
我的問題是為什么我不需要為--follow指定閾值來查找重命名?
謝謝
如果使用--find-renames
指定閾值,則在使用--follow
時將應用該閾值。 但是,當您僅指定--follow
將使用默認的相似性索引(在大多數情況下應該沒有問題)。
Follow需要重命名檢測才能工作,但是重命名檢測本身對於git show
, git status
等也很有用。我建議默認使用以下命令啟用它:
git config --global diff.renames true
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.