Bartlomiej Lewandowski
Bartlomiej Lewandowski

Reputation: 11190

List all files added/modified by a user

I am looking for a way to print out all files modified by me, to check and fix any style mistakes I have made.

I was thinking of using git log --stat --author="ME" but this gives not only the modified files, but also the commit message. This prevents me from using grep, uniq and other tools to show me the file list.

Is there another way to do this?

Upvotes: 1

Views: 57

Answers (1)

Mureinik
Mureinik

Reputation: 312404

You could use the format property to remove the commit message:

git log --name-only --pretty=format:"" --author="ME"

This will produce a bunch of blank lines, but if all you need is a list of files anyway, this shouldn't be an issue:

git log --name-only --pretty=format:"" --author="ME" | sort | uniq

Upvotes: 1

Related Questions