On Sun, Mar 6, 2016 at 1:27 PM, Nick Coghlan <ncoghlan@gmail.com> wrote:
The easy way:
* clone the upstream repo read-only * add your fork as an additional read/write remote: * e.g. "git remote add pr <URL of fork>" * work in a branch * e.g. "git checkout master && git checkout -b issueNNNN-summary-of-issue" * publish via your fork, and then submit back to the main repo * "git push pr" * use the web UI to submit the PR
My workflow is exactly this, except that I have my own fork under the name "origin", and the upstream as "upstream". I then tell have these two commands (script/alias): branch: git fetch upstream master:master git checkout -b "$1" master push: git push -u origin `git symbolic-ref --short HEAD` To work on something: $ branch issueNNNN-whatever-branch-name ... make edits ... $ git commit ... $ push And then use the web UI to submit the PR. (There are alternatives to that, but I don't do enough to justify them.) The 'branch' command does a network transaction, so it'll take a bit of time. But it's the easiest way to make sure I never forget to update to the latest upstream. If in doubt, script it :) ChrisA