I am able to get the files changes and lines affected along with a lot of other stuff by this command
git log -p -1 --stat --color=never
But I just need file names and no of lines affected, how would I get that
I guess you are looking for
git diff --stat --summary -M HEAD HEAD~
it outputs the stats in the same format as a git merge
does.
Or without color for two other commits, e.g.
git diff --stat --summary --no-color -M 6c1dea3 e8f4b44
or only the staging area
git diff --cached --stat --summary -M
If you can ignore the blank lines, as mentioned in "How to have git log
show filenames like svn log -v
", you can use:
git log --name-only --pretty=format: <branch name>