Skip to content

Instantly share code, notes, and snippets.

@thejeshgn
Last active July 26, 2017 08:13
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 thejeshgn/c81d784a8a81db41f97eaa6c5d4f6ffb to your computer and use it in GitHub Desktop.
Save thejeshgn/c81d784a8a81db41f97eaa6c5d4f6ffb to your computer and use it in GitHub Desktop.

create global hook temlates

git config --global init.templatedir '~/.git-templates' mkdir -p ~/.git-templates/hooks

Edit or create post hook

nano ~/.git-templates/hooks/post-commit

Add the line to send the message

curl -s https://api.nomie.io/v2/push/<API_KEY>/action=track/label=Code/charge=1 > /dev/null

save it

make it executable

chmod a+x ~/.git-templates/hooks/post-commit

reinit so the hooks are copied to the specific git repo

git init

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