Skip to content

Instantly share code, notes, and snippets.

@PaulRBerg
Created March 6, 2023 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulRBerg/9707662d42895ca99184df854b4c0ce5 to your computer and use it in GitHub Desktop.
Save PaulRBerg/9707662d42895ca99184df854b4c0ce5 to your computer and use it in GitHub Desktop.
Git alias to copy the message of a commit SHA
[alias]
# Copy message of provided commit: git cm COMMIT_SHA
cm = !"git rev-list --format=%B --max-count=1 $1 | tail +2 | pbcopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment