列出特定文件的所有提交 [英] List all commits for a specific file
本文介绍了列出特定文件的所有提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法列出所有改变特定文件的提交?
解决方案
- -follow
用于特定文件
git log --follow filename
code>
与其他解决方案的区别
请注意,其他解决方案包括 git log path
(没有 - follow
)。如果您想追踪例如更改目录,但在重命名文件时发生绊倒(因此使用 - 跟随文件名
)。
Is there a way to list all commits that changed a specific file?
解决方案
The --follow
works for a particular file
git log --follow filename
Difference to other solutions given
Note that other solutions include git log path
(without the --follow
). That approach is handy if you want to track e.g. changes in a directory, but stumbles when files were renamed (thus use --follow filename
).
这篇关于列出特定文件的所有提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文