Git is notorious by its encouraged length limit for commit message titles: first line should not be more than 50 characters long (to fit an e-mail header).
That reminds me of... well, is there a hook that automatically posts commit messages to twitter as soon as they're pushed to the server?
Here you go:
#!/bin/sh
username=<your Twitter account>
password=<your Twitter password>
service_uri=http://api.twitter.com/1/statuses/update.json
subject=`git log --pretty=format:%s -n1`
curl -u "${username}:${password}" -d status="${subject}" $service_uri
Save as .git/hooks/post-commit
in your repository and make it executable.
[Note: completely untested, I just made this up on the spot.]
Github does this with their "Service Hooks" feature. The code for it is here: github/github-services/lib/services/twitter.rb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With