That's right folks, such a feat is indeed possible - no more splitting discussions between the issue and the corresponding pull request. This is command-line-only, though.
Here's what you need:
Install Chris Wanstrath's hub gem; I recommend that you alias it go
git
also.Clone the main repo with a plain old
git clone
; you might want to use git's new powers and reference a GitHub username and repo for that.Run
git fork
. This will fork the repo (surprise!) and also add your fork as a remote with your GitHub username as it's name.You can now hack away with your usual workflow (create topic branch and push to it).
When you are ready to create a pull request (that is, you want/need someone to look at your code, because pull requests are discussions), run the following command:
git pull-request -i ISSUE_NUMBER
et voilĂ ! This attaches your code to the issue, even maintaining chronological order between the commits and the comments, and also redirects the issue's url to the pull request. C'est fantastique!
There are a couple other switches you can use with pull-request
and a million other things that hub
does, definitely check it out. Personally, I love that my git workflow can now be entirely CLI-based.