path/to/file
假设在具有特定 sha 的提交中提交了特定版本中的文件(及其路径) ,我们称之为hex_sha
. 使用后,git blame file/to/path hex_sha
我在该版本中修改了每一行。对于这个例子,我们假设检查带有 number line_i
Supposing to have another prior date的行date_limit
。我如何使用来获取文件中的行已从带有 sha 的修订版修改到特定日期git log
的次数(或提交列表)?line_i
path/to/file
hex_sha
date_limit
我试过:
git log --since=date_limit origin..hex_sha -- -Lline_i,+1:path/to/file
和这个命令的其他不同安排,但没有任何反应,或者 git 错误地理解了文件名。我的印象是,--
在存在目标修订后,git 将第一个参数--
作为文件路径。我确定 date_limit 在考试提交之前。