Cooking recipe for GitHub

Simple bugfix / pull request

If you want to help an open source project on GitHub and have a simple bugfix that you would like to see integrated, here's the most straightforward way to do it:

- fork the repo on GitHub
- clone your repo locally
- create a new local branch (let's call it doc-fix-1)
      git branch doc-fix-1
- switch to this branch
      git checkout doc-fix-1
- change the code :-)
- commit it
      git commit -a -m "simple doc fix"
- push it to github, creating a new branch
      git push origin doc-fix-1
- create a pull request on GitHub

(Just a personal note: how I wish that git would at least try to be as user-friendly as hg is...)

Syncing a fork

If you've forked a repository and want to keep it up-to-date, do this:

Add the original repo (just once)

git remote add upstream

Sync with original (whenever you like)


git fetch upstream
git checkout master
git merge upstream/master


333 Words

2015-12-06T08:18:00-08:00