Skip to content

Instantly share code, notes, and snippets.

@gboone gboone/commit-msg
Last active May 11, 2017

What would you like to do?
Copy Federalist preview URL on commit
# A commit-msg hook to copy the federalist preview url to your clipboard after you commit.
# Note: The URL will not work until the preview site has actually generated, that doesn't happen until you `push`
NAME=$(git branch | grep '*' | sed 's/* //')
echo "Your federalist preview will be at$NAME/"
echo "$NAME/" | pbcopy
echo "This url has been copied to your clipboard."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.