git blame 使用 -L <n,m> 选项抛出一个错误的修订错误

标签 git powershell posh-git

其中一个 git blame 选项处理一个行范围。手册说:

-L Process only line range n,m, counting from 1

现在,我有一个超过 100 行的文件。当我运行 git blame -L 5,15 myFile.txt 时,git 提示:

fatal: bad revision '15'

有趣的是,当我运行 git blame -L 5 myFile.txt 时,git 并没有报错。

这是怎么回事?

最佳答案

如果你引用这些行它会起作用

git blame -L '10,200' composer.json

关于git blame 使用 -L <n,m> 选项抛出一个错误的修订错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27384595/

相关文章:

git/gitlab : Is there a built-in way to enforce custom requirements before merging?

windows - 批量重命名文件并在文件名已存在时覆盖 (windows)

powershell - 测试运行后,nunit-console在远程Powershell session 中挂起

git - 发出 git log 命令时 PowerShell 挂起

git - 如何在特定提交上将修改后的提交推送到远程 git repo

Gitconfig 凭据操作系统检查

git - 如何比较github中同一分支上的两个不同提交?

powershell - echo "string"> Windows PowerShell 中的文件将不可打印的字符附加到文件

git stash 应用未知选项 : -encodedCommand error

oh-my-zsh - Windows 终端 + oh-my-posh 不显示 git 状态