To get set up, see: http://help.github.com/fork-a-repo/
Each time you want to get the latest from upstream, use:
$ git fetch upstream
$ git merge upstream/master
To add a new server to an existing local repo (in this case for iangilman/openseadragon):
$ git remote add iangilman [email protected]:iangilman/openseadragon
To then push to that server:
$ git push iangilman <branchname>
To see what's changed between branch foo and master: git diff master..foo
To rename a branch: git branch -m old_name new_name
To apply a single commit from another branch: git cherry-pick <commit-id>
To delete a branch: git branch -D <branch-name>
Create a patch with changes between the current branch and master: git format-patch master --stdout > foo.patch
Pull the last 3 commits off of master into a new branch:
git branch newbranch
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work.
git checkout newbranch
Push a branch to the server and connect it for future pulls: git push -u origin <branch-name>
To abort a merge: git reset --merge
You can add a new commit that reverts the file: do git checkout <commit-id> <path>
and commit the result.