-1

I'm working on a git log cmd but I have trouble when I try to get the author of a commit it didn't show me the author of the commit but the people who merged this branch. I didn't saw how can I get the author of the branch...

This is my actual command:

git log -m --first-parent --date=format:%c --pretty=format:'<tr><td>%ad</td><td>%cN</td></tr>\r\n'

Update:

I tried with:

I try with ` git log --date=format:%c --pretty=format:'<tr><td>%ad</td><td>%cN</td></tr>\r\n'`, i still get the same result

And I still get the same result

Alexis CHEVREUX
  • 132
  • 1
  • 11
  • Check this: Find out a Git branch creator https://stackoverflow.com/questions/12055198/find-out-a-git-branch-creator and may filter the merges https://stackoverflow.com/questions/35945860/view-git-log-without-merge-commits – rebeling Jan 14 '20 at 10:06

2 Answers2

0

From the git log docs:

--first-parent

Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting to updated upstream from time to time, and this option allows you to ignore the individual commits brought in to your history by such a merge. Cannot be combined with --bisect.

If you set this option, then you will get only the names of people that were merging the branch.

I suggest you to exclude this option from your command.

Community
  • 1
  • 1
NutCracker
  • 11,485
  • 4
  • 44
  • 68
0

I find ! I have to use aN instead of cN, a is for author and c for comitter

Alexis CHEVREUX
  • 132
  • 1
  • 11