How to cherry-pick the last sha from another branch in Git with 1 command?

Viewed 18125

I find myself doing this a lot when cherry-picking a commit from another branch.

$ git log -1 another_branch
commit <commit_sha>
// copy <commit_sha>
$ git cherry-pick <commit_sha>

Can I do all of this in one command, if so, what is it?

1 Answers
Related