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 Diasporacode:

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 onebranch.

Do not merge the upstream master with your development branch;
rebase your branch on top of the upstreammaster.

A single development branch should represent changes related to a
single issue. If you decide to work on another issue, create
anotherbranch.

Read the whole thing if you’re new to GitHub (and maybe even if you’renot).

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 onGitHub.