0

I obtained a git commit ID using git log --grep=<someregex>

Repository has over 600 000 commits and this one is old several months. How can I do a simple git diff that would show the changes made by this commit compared with previous commit, so that I would only see changes made by this commit?

git diff give me diff of this to latest one which results in quadrillions of lines and crash whole git...

Petr
  • 13,069
  • 17
  • 77
  • 136

1 Answers1

0

You could view exactly what the commit did by doing git show <sha>. Alternatively, if you positively have to use git diff, you can use the ^ syntax: git diff <sha>^..<sha>.

Mureinik
  • 277,661
  • 50
  • 283
  • 320