When merging topic branches with the squash method,
i.e: git merge --squash ${topic_branch}
,
by default the author and committer of the merge commit following
will be the one executing the merge.
But most of the time this person(or tool) is the integrator and to be able to follow back a topic author we need to force the author of the commit.
git commit --author="$( \
cat .git/SQUASH_MSG \
| grep -m1 '^commit' \
| awk '{print $2}' \
| xargs git log -1 --pretty=format:'%an <%ae>' \
)"
The main caveat is that tt takes the author of the last commit of the branch, so it will not work well on shared topic branch.