In following example tree:
A-B-C-D-E (master branch)
\\
F-G-H (xxx branch)
I\'m looking for F - the first commit in xxx branch. I
git cherry master -v | tail -1
however this will only give you the first commit on branch xxx that is not in master, not the first commit on branch xxx ever. the latter would be difficult if branch xxx has been deleted and/or re-created one or more times. it that case you could try the following:
git reflog | grep checkout | grep xxx | tail -1