Skip to content

Instantly share code, notes, and snippets.

@DoomyTheFroomy
Forked from ingoradatz/README.md
Created October 10, 2012 07:26
Show Gist options
  • Save DoomyTheFroomy/3863719 to your computer and use it in GitHub Desktop.
Save DoomyTheFroomy/3863719 to your computer and use it in GitHub Desktop.
Turning an existing GitHub Issue into a Pull Request

Why?

This command attaches code (pull request) to an existing issue. This prevents:

  • creating a new issue when opening a new pull-request
  • splitting an on-growing discussion from an issue into an pull request issue

Usage?

You can use personal and organization github names and their branches.

git pull-request -i issue-number-without-the-# -b request-to-branch -h request-from-branch

Be sure you are on the right local git repo (git branch) and try a command like the following (replace the githubnames, branchnames and issue number):

git pull-request -i 123 -b defunkt:develop -h defunkt:feature/awesomeness
# install on OS X
$ brew install hub
# other systems
$ curl http://defunkt.io/hub/standalone -sLo ~/bin/hub
$ chmod +x ~/bin/hub
# alias it as git
$ alias git=hub
$ git version
git version 1.7.9
hub version 1.8.4 # ← it works!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment