How can I define a cherry fence committer in Git?

In Git, cherry-pick , the original author of the commit, timestamp, etc., is saved, at least when there are no conflicts. But is there a way to determine which user executed the cherry picker that led this commit to a new branch?

+7
source share
2 answers

The author will be selected from the original commit, but the committer (shown with git log --format=full ) will be the one who makes the cherry pick. This committer field is not safe, because the creation of the fixation of the cherry is ultimately under the control of the cherry picker. The only reliable way to track the creator of the commit, in this case the cherry grabber, is to turn off the commit.

A simple method is to carefully register clicks on the git server. The push impulses indicate who made the cherry cue or, more precisely, who posted it.

+7
source

Use either the argument --pretty=full , and git log , which leads to 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 committer --format="%cN" , which gives:

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

See git -log (1) for more details.

+8
source

All Articles