GitHub Best Practices
Use one branch per pull request.
I’ve been using GitHub since early 2010, but I literally just learned how to contribute to other projects properly. From Diaspora’s wiki:
If you’re familiar with git and GitHub, here’s the short version of what you need to know. Once you fork and clone the Diaspora code:
- Don’t develop on the master branch. Always create a development branch specific to the issue you’re working on. Name it by issue # and description. For example, if you’re working on Issue #359, an aspect naming fix, your development branch should be called 359-aspect-names. If you decide to work on another issue mid-stream, create a new branch for that issue—don’t work on both in one branch.
- Do not merge the upstream master with your development branch; rebase your branch on top of the upstream master.
- A single development branch should represent changes related to a single issue. If you decide to work on another issue, create another branch.
Read the whole thing if you’re new to GitHub (and maybe even if you’re not).
Update 5/27/2012: I should mention that I am not a Diaspora user, nor do I have any interest in the project. They just have a nicely written set of instructions that apply equally well to any other project on GitHub.