Last Updated: July 14, 2021
·
3.873K
· chrishale

Copy last git commit message to clipboard in OSX

I use the following in an alias 'lcm' for copying the last git commit message in a repo to my clipboard, so that it can be pasted into various time tracking apps.

git log -1 --pretty=%B | pbcopy

Super simple stuff.