Skip to content

Instantly share code, notes, and snippets.

@etorreborre
Created September 29, 2023 11:08
Show Gist options
  • Save etorreborre/e71d28c35d1142613656a0476a1634ca to your computer and use it in GitHub Desktop.
Save etorreborre/e71d28c35d1142613656a0476a1634ca to your computer and use it in GitHub Desktop.
copy the most recent commit to the clipboard
```
git log -1 --pretty=full | head -1 | awk '{ print $2 }' | pbcopy
```
@etorreborre
Copy link
Author

Create an alias for the command:

alias cc=$(git log -1 --pretty=full | head -1 | awk '{ print $2 }' | pbcopy)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment