Skip to content

Instantly share code, notes, and snippets.

@mbleigh
Created November 18, 2008 18:01
Show Gist options
  • Save mbleigh/26189 to your computer and use it in GitHub Desktop.
Save mbleigh/26189 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# Present.ly Post-Commit Hook for Git
# change your subdomain, username and password, then copy this file as .git/hooks/post-commit
# then 'chmod +x .git/hooks/post-commit'
# it'll run every time you commit (not push, mind you)
$project='Project Name'
$subdomain='yoursubdomain'
$username='username';
$password='password';
$git_text = `git log -n1 --pretty=format:"[$project] (%h) %s"`;
chomp $git_text;
`curl "https://$subdomain.presentlyapp.com/api/twitter/statuses/update.xml" -u $username:$password -d status="$git_text"`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment