You can generate github pull requests using a tool called hub. Note, there are other tools that do the same thing...
Install the hub tool via release somewhere in you path.
tl;dr see the "Create a pull request using hub" bullet.
A typical workflow
[A]
- fork the desired repo on github, e.g. say we forked github.com/Araq/nim
- clone your fork locally, e.g.,
- $ git clone github.com/jpoirier/nim; cd nim
- add the upstream repo, this is the original repo you forked from on github
- (devel)$ git remote add upstream git://github.com/Araq/nim
[B]
- create a feature/bugfix branch and check it out:
- (devel)$ git checkout -b docFixes
- push the branch to remote origin, i.e. to your forked repo on github
- (docFixes)$ git push -u origin docFixes
- make changes/mods
- make more changes/mods
- commit changes:
- (docFixes)$ git commit -am"fixed typos in docs"
- sync with the upstream repo:
- (docFixes)$ git merge upstream/devel
- push the branch changes to the remote repo, i.e. to your forked repo on github
- (docFixes)$ git push
- Create a pull request using hub:
(docFixes)$ hub pull-request
And the full option list for pull-request. See the default behaviour in hub's docs:
$ hub pull-request [-f] [-m <MESSAGE>|-F <FILE>|-i <ISSUE>|<ISSUE-URL>] [-o] [-b <BASE>] [-h <HEAD>]
- delete, or not, the (local and remote) docFixes branch once the pull request has been closed
(devel)$ git branch -d docFixes
(devel)$ git push origin :docFixes
- sync the local devel repo:
- (devel)$ git merge upstream/devel
goto B