| CARVIEW |
Post-Receive Hooks
For help testing webhooks, see this guide
If you supply a post-receive URL, GitHub will POST to that URL when someone uses git push on that repository.

What we’ll send is JSON containing information about the push and the commits involved.
Here’s the template we use in Ruby to generate the JSON:
This is sent as a POST with a single parameter: ‘payload’
So, for example, you’d do something like this in a Sinatra server:
A template Rack server for the task: raggi/github_post_receive_server
Send something to Campfire, IRC, Twitter, your CI server, whatever. It’s your data.
The commits array is ordered with the most recent commit as the first element. The last element, therefor, is the oldest commit.
Here’s an example of a POST’d ‘payload’ JSON object:
For more information on this technique, see the Web Hooks Wiki.
Setup
- Installing git (OSX)
- How to install git on OSX
- Generating SSH keys
- How to generate SSH keys and add them to GitHub
- Troubleshooting SSH issues
- Solutions to common SSH issues
- Setting user name, email and GitHub token
- Configure your local git installation so that commits are linked to your GitHub account
- Installing Git HTML help
- How to install the local git HTML help files
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
- Dealing with line endings
- How to ensure that line endings are consistent in your repo
Troubleshooting
- Troubleshooting SSH issues
- Solutions to common SSH issues
- Fixing egit corruption
- How to fix corruption in a remote repo caused by egit
- Testing webhooks
- How to test post-receive webhook calls from your repo
Repos
- Deleting a repo
- How to remove a repo from your GitHub account
- Moving a repo
- How to move a repo from one account to another
- Removing sensitive data
- Dealing with accidentally committed passwords or other sensitive information
- Splitting a subpath out into a new repo
- How to generate a new repo from a subpath, retaining history.
- Working with subtree merge
- How to use subtree merge to merge one repo into another as a subpath.
Collaborating
- Forking a project
- How to fork a project, submit changes, and pull from other repos in the fork network
- Post-Receive Hooks
- Working with GitHub's post-receive web hooks.
- Testing webhooks
- How to test post-receive webhook calls from your repo
Mac
- Installing git (OSX)
- How to install git on OSX
- Generating SSH keys (OSX)
- Setting up SSH keys on Mac OSX
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
- Dealing with line endings
- How to ensure that line endings are consistent in your repo
Windows
- Generating SSH keys (Win/msysgit)
- Setting up SSH keys with msysgit on Windows
- Working with SSH key passphrases
- SSH key passphrases, why you should use them, and how to avoid re-entering them
- Dealing with line endings
- How to ensure that line endings are consistent in your repo
Linux
- Generating SSH keys (Linux)
- Setting up SSH keys on Linux
- Dealing with line endings
- How to ensure that line endings are consistent in your repo
Other
- Userscripts and Bookmarklets
- Various bits of code to enhance and personalize GitHub
