Created
August 27, 2010 12:23
-
-
Save Bouke/553258 to your computer and use it in GitHub Desktop.
Copy commit-id to clipboard in post-commit hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Use this per example as a post-commit hook | |
git log -n 1 --pretty=%H | tr -d '\n' | xclip -sel clip | |
echo "\033[32mCopied commit-id to clipboard\033[0m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment