Search code examples
gitlast-modifiedblame

Git: Find last edits from a specific user in a specific file


I have a project which sources are controlled with help of git.

Right now I want to find out when my teammate made last edits in a specific file. I want to find out SHA1 of commit or to see his edits as diff.

I guess I can use git log --stat <path/to/file> and review list of all commits where my file was changed.

Are there any quick ways to do it?


Solution

  • you can use git log with a pathspec and --author option:

    git log --author=your_teammate -- path/to/file