How can one determine the committer of a cherry-pick in Git?

In Git, cherry-pick retains the original commit’s author, timestamp etc, at least when there are no conflicts. But is there any way to determine what user performed the cherry-pick which brought that commit to the new branch?

  • How do I share single files between multiple branches in git
  • Git pull on non-working branch without switching
  • git cherry-pick -x: link in details instead of in summary
  • Git move single commit from feature_branch to master
  • Cherry-picking from git to svn (or, How to keep a project history in git and releases in svn)
  • Move several commits from one branch to another?
  • use Windows Authentication for private BitBucket git repo?
  • Git commit fails: “assertion `g_type_from_name (name) == 0' failed”
  • Commit within a pre-push to update version
  • What happens behind the scenes when I do a repo sync?
  • EGit: why “Local branch as upstream is not recommended”?
  • git status shows changed files but git diff doesn't
  • 2 Solutions collect form web for “How can one determine the committer of a cherry-pick in Git?”

    The author will be picked up from the original commit, but the committer (shown with git log --format=full) will be the one doing the cherry picking. This committer field is not secure, as cherry-pick commit creation is ultimately under the control of the cherry-picker. The only reliable way to track the commit creator, in this case the cherry pick instigator, is by signing off on the commit.

    A simpler method is to carefully log pushes on the git server. The commits introduced by a push indicate who did the cherry-pick or, more precisely, who published it.

    Use either the --pretty=full argument to git log which results in something like:

    git log -1 --pretty=full
    commit 123abc
    Author: Author Name
    Commit: Commiter Name
    Date: Wed Mar 20 09:43:20
    
    Commmit Message
    

    or, if you are only interested in the name of the commiter --format="%cN" which yields:

    git log -1 --format="%cN"
    Commiter Name
    

    See git-log(1) for more information.

    Git Baby is a git and github fan, let's start git clone.