I am trying to get authors of changes between 2 commits.
What would be the best for me is something like:
git diff --name-only master
but instead of
--name-only
parameter like
--authors-only
But unfortunately diff
does not have such one. There is no restriction I have to use diff
command, git log
or others are also fine.
I need to it to blame people who caused tests to fail.
git log --pretty=format:"%an" prevTestCommit..lastTestCommit | sort | uniq
you can use something like
git log --pretty=format:"%an %aE" f398e997ea9ad81e586b1f751693cd336963ba6a ^bb69eb11d979437a0b390ac9333342e7594c211c
where the format will print the author name and email and than the commits see List commits between 2 commit hashes in git
for more information on how to use get the commits between two given commits.
Not sure if this exists per default, but you could specify a custom output format for git log
:
git log --pretty="format:%an"
This would print only author names. For more details, see the section PRETTY FORMATS
in git log --help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.