If I cherry-pick from multiple branches, is there a simple way to figure out where the commit was coming from (e.g. the sha of the original commit)?
Example:
- a
No information about the original commit is embedded in the newly created commit, so there's no direct way to tell. What you suggest (searching for the commit message) is probably the best way - it's certainly a lot easier than searching for a commit with the same diff:
git log --grep="" --all
Unless of course the commit's no longer reachable from a branch... probably then you'd want to look at the output of git fsck.