<div dir="ltr">The general workflow that's being described is:<div><br></div><div style> - You open an issue for all bugs, enhancements, etc.</div><div style> - When someone starts working on one of these, they create a branch (we use descriptive branch names and put -NNNN at the end, with the issue number).</div>
<div style> - When the branch reaches the point where the author feels it could be merged or wants to open it up for easy discussion, they send a pull request.</div><div style><br></div><div style>The pull request is a signal to the people working on the base code (that the pull request is against/for, let's just call it "master") that the author of the branch has it in mind to merge their branch into master. That may be a way off, it may never happen, or it could be done almost immediately. Github doesn't have any formal mechanism for having a branch approved, or even a mechanism for saying "I'm interested in this pull request and I intend to review / comment on it before it's merged, so please don't merge it until I've +1'd".  That's a weakness and a strength. We adopted the convention (as @jkakar mentioned) of having interested parties just edit the pull request description, to put in a string like "terrycojones: **pending**" to indicate that you're planning to comment.</div>
<div style><br></div><div style>The pull requests are discussions about the code, and the code changes while the pul request is outstanding. That's normal. Other people, who have the right permission, might want to push changes into the branch that's being worked on. E.g., there could be a jkakar/fix-race-condition-4772 branch. I switch onto that branch (git remote update --prune jkakar;  git co jkakar/fix-race-condition-4772) and run the tests, take a look, etc.  I decided to help out by making a few changes, so I make my own branch:  git co -b fix-race-condition-4772.  That creates terrycojones/fix-race-condition-4772 which I can work on, commit to, and push back to github.  I could then send a pull request to merge that branch into jkakar/fix-race-condition-4772 or if I have the right perms, just push it directly into that branch.</div>
<div style><br></div><div style>The diff in the pull request always reflects the latest changes, as you'd expect. So over time as there is discussion & code change around the pull request, the diff will change. As I mentioned, parts that are fixed will have the conversation disappear (this sounds alarming, perhaps, but it works).</div>
<div style><br></div><div style>At some point everyone who's interested will have contributed to the discussion, to the code, and signed off.  Then you merge it, using the web UI.  Sometimes a pull request doesn't reach the point where there's agreement that it should be merged. When that happens, we usually close the pull request so it's not cluttering up the pull requests page. The branch doesn't go away, of course, and can be re-proposed for merging via a later pull request.</div>
<div style><br></div><div style>I hope that helps.  I think most of this is open-ended and teams can choose the conventions that suit them. The above is just what we've done, but it does seem to match up pretty closely with some of the links people have been posting.</div>
<div style><br></div><div style>One point of difference that I don't know the best answer to: We tend to each have our own fork of  a repo, and to send pull requests into the repo "owned" by the organization. Others (including Github themselves) just have one repo and anyone can make a branch in that repo and propose it for merging into the master of the same repo.  I think I prefer the former, though it has a little more overhead and it requires people to do a git remote add git@github.com:name/project.git for the other people whose changes you want to track and pull in etc (via git remote update --prune).</div>
<div style><br></div><div style>Terry</div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 4, 2013 at 5:42 PM, Tobias Oberstein <span dir="ltr"><<a href="mailto:tobias.oberstein@tavendo.de" target="_blank">tobias.oberstein@tavendo.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">in general: +1 for this<br>
<div class="im"><br>
> Finally, my own minor concern: Github has no notion of a "code review" as a unit of work.  A pull request is just "open" until it is "closed".<br>
</div>> <snip><br>
<br>
I _think_ the following is true (if so, I find that strange) - pls correct me if I'm wrong:<br>
<br>
A pull request is not tied to a specific rev, but only to a source repo/branch.<br>
While the pull isn't merged (and hence closed), more commits on the source repo/branch can be added.<br>
<br>
So a pull request is kind of moving target ..<br>
<br>
GitHub seems to view that as a feature, not bug:<br>
"""<br>
Pull requests can be sent from any branch or commit but it's recommended that a topic branch be used so that follow-up commits can be pushed to update the pull request if necessary.<br>
"""<br>
<a href="https://help.github.com/articles/using-pull-requests" target="_blank">https://help.github.com/articles/using-pull-requests</a><br>
<br>
"""<br>
It's important to use a new branch for pull requests for several reasons:<br>
<br>
It allows you to submit multiple pull requests without confusion. The classical Github gotcha is to continue committing to a pull request branch after making the initial request. When these commits are pushed to the remote, they will become part of the original pull request which often ends up conflating unrelated functionality.<br>

"""<br>
<a href="http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/" target="_blank">http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/</a><br>

<br>
However: <a href="https://github.com/blog/712-pull-requests-2-0" target="_blank">https://github.com/blog/712-pull-requests-2-0</a><br>
I'm not sure how to interpret that ..<br>
<span class="HOEnZb"><font color="#888888"><br>
/Tobias<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br></div>