[英]How can I see the list of all commits that affect a specific file with git (including orphaned or dangling commits)
[英]How can I use Git to see in which commits a file was renamed?
我不想看到整個歷史或差異(所以git log --follow filename
不是我要找的)。
我想找出文件可能已重命名的提交 ID,以便找出更改的日期和時間。
git可以做到嗎? 我的 Google Fu 很弱,我找不到任何相關信息。
嘗試
git log --name-status --follow --diff-filter=R -- new_filename
--diff-filter=R
匹配重命名文件的提交。 --follow
和新文件名也是必需的。 如果沒有--follow
,則排除具有重命名的提交。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.