Search code examples
gitpowershellgit-blame

git blame - fatal: bad revision '22'


According to this page (http://git-scm.com/book/en/v2/Git-Tools-Debugging-with-Git ) I should use a comma between line numbers when using git blame.

However, if I try it out on my Windows machine using Powershell:

git blame -L 12,22 <name of file>

I get fatal: bad revision '22'

What's the problem? Something to do with Powershell?


Solution

  • Try quoting the argument to -L (e.g. -L "12,22").

    Comma is an operator in powershell so it is probably mis-parsing the command without the quotes or something like that.