Question: I am trying to cherry-pick a commit from one branch to another. Consider the below scenario.

Branch A -> commit1 -> commit message "12345 Hello World"

I want to add a new message at the beginning of the commit message while doing cherry-pick. So after cherry-pick it should look like,

Branch B -> commit2 -> commit message "98765 ........"

Here 98765 is the extra message I want to add. From Git documentation I found a command "git cherry-pick --edit" but I didn't find any example to understand its proper use.

Answer: 
There isn't much to explain about `git cherry-pick --edit`. If you cherry pick with the `--edit` option, Git will bring up the commit message editor window before making the commit. There, you may customize the commit message however you want.

As to the logistics of *why* this is possible, when you cherry pick a commit you actually are making a *new* commit. So there is nothing extra to prevent you from using any commit message you want.
From comments, what you want is for the edit to occur automatically, rather than for git to present you with the commit message in an editor window.

To do this, write a script that edits the message in the required way. Your script will receive a filename as its first command-line argument, and it must update that file in place. For example you could use a perl script similar to:

```
open my $fh, '+<', $ARGV[0] or die;

local $/ = undef;
my $a = <$fh>;

seek $fh,0,0;
print $fh "new content $a";

close $fh;

```

Then you would specify this script as the editor to be used by your `cherry-pick` cmmand

```
git -c core.editor="perl /path/to/your/script.pl" cherry-pick --edit <commit>

```