How to work with GitHub

From Spatial Data on the Web Working Group
Jump to: navigation, search

Recommended pattern for github workflow for W3C spec drafting:

  1. create a local copy of the W3C SDW repo: git clone https://github.com/w3c/sdw.git
  2. configure remotes on local - specify the W3C repo remote as `upstream`: git remote add upstream --track https://github.com/w3c/sdw.git
  3. because we're using GitHub Pages for publication, `gh-pages` is our main branch
  4. create a branch in your local repo which tracks gh-pages in upstream: git checkout -b {my-branch-name} upstream/gh-pages
  5. make the changes in your branch & commit - with commit message please!
  6. synchronise your changes with upstream: git push upstream {my-branch-name}
    1. note LvdB: git push upstream {my-branch-name}:{my-branch-name} to make sure to push to own working branch remotely instead of directly to gh-pages
  7. within GitHub, create a Pull Request from {my-branch-name} into gh-pages ... at this point, you might assign the PR to someone else to check before merging
  8. EDITORS ONLY: within GitHub, Merge the changes into gh-pages ... then you will see your stuff @ http://w3c.github.io/sdw/bp/
  9. bring all those changes back into your local repo: git fetch upstream
  10. rebase (don't 'pull' - because this creates another commit) changes on your branch: git rebase upstream/gh-pages

(you might also want to rebase local/gh-pages too)

Alternatively - send your text to the Editors (Linda, Payam, Jeremy) via the WG email list.