I also stopped using pull after having troubles with one of my previous changes. So I do exactly what George mentioned:<div><br></div><div>1) Create feature branch:</div><div>  git checkout -b FORGE-XXX</div><div>2) Fetch the upstream (which is configured to point to forge core)</div>
<div>  git fetch upstream</div><div>This will bring all the changes in upstream (and in all branches there)</div><div>3) Rebase your feature branch to the upstream&#39;s master branch. You need to commit all your changes in this branch (if you have any) before doing that</div>
<div>  git rebase upstream/master</div><div>This will modify your tree by moving your commit on top of all the commits in origin/master</div><div>4) Do some stuff and commit it</div><div>  git add .</div><div>  git commit -m &quot;...&quot;</div>
<div>5) After you&#39;re finished, push to your github repo in a new branch (named after the feature)</div><div>  git push origin FORGE-XXX</div><div>6) Go to github and choose that branch</div><div>7) Create pull request</div>
<div>8) After the pull request is merged, I usually delete my remote feature branch</div><div>  git push origin :FORGE-XXX</div><div><br></div><div>I&#39;m not sure whether we need at all our origin/master branch. I plan to delete mine sooner or later.</div>
<div><br></div><div>Cheers,</div><div>Ivan<br><br><div class="gmail_quote">On Wed, May 2, 2012 at 10:11 PM, Keith Babo <span dir="ltr">&lt;<a href="mailto:kbabo@redhat.com" target="_blank">kbabo@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I love to get on the soapbox on this issue, so I&#39;ll throw in.  First, I agree with the statements below.  Topic branches that correspond to JIRAs are clean and easy to track.  In SwitchYard, we also prefix the commit message with the JIRA ID just to make it easy to jump from &#39;git log&#39; to JIRA without a search in between.  </div>
<div><br></div><div>On the subject of rebase, let me just say that merge commits are the devil!  For example :-)</div><div><br></div><div><a href="https://github.com/forge/core/pull/149" target="_blank">https://github.com/forge/core/pull/149</a></div>
<div><br></div><div>We ask anyone that issues a pull request to rebase against upstream master as a courtesy.  Tends to prevent messy merges for the person pushing the change and also allows for a clean push on top of upstream tip.  There are always times when someone submits a pull and then I push something ahead of their commit.  This is easy enough to correct when pushing - I just rebase the commit myself (which is really just adjusting the parent commit link) and then push - no messy merge commit.</div>
<div><br></div><div>Thanks for the opportunity to vent.  That was fun. ;-)</div><div><br></div><div>cheers,</div><div>keith</div><div><br></div><div>p.s. don&#39;t ever click on that &quot;automatically merge pull request&quot; button on Github.  A puppy dies every time you use it.</div>
<div><div class="h5"><br><div><div>On May 2, 2012, at 2:07 PM, George Gastaldi wrote:</div><br><blockquote type="cite"><div>Right, I have 3 statements on this:<br><br>1) I prefer adding the &quot;origin&quot; as my forked repo and &quot;upstream&quot; in forge/core.<br>
2) I name every branch as &quot;feature/FORGE-XXX&quot;, where FORGE-XXX stands<br>for the JIRA worked on it.<br>3) Always use rebase instead of merge. It will do exactly what you<br>want and won´t mess with your branch.<br>
Eg: if you are working on branch &quot;feature/FORGE-550&quot; and you want this<br>branch to have the latest changes from your master, just run:<br><br>git rebase master feature/FORGE-550<br><br>And at last but not least, I always pull from upstream and push to<br>
origin. NEVER push directly into upstream (that´s why pull-requests<br>are for :) ) !<br><br>I think that´s all.<br><br>Regards,<br><br>George Gastaldi<br><br>2012/5/2 Lincoln Baxter, III &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt;:<br>
<blockquote type="cite">Good point! we need to add this to the docs!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">George, do you have a good strategy for this? You are the merge master :)<br>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">~Lincoln<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Wed, May 2, 2012 at 10:45 AM, Thomas Frühbeck &lt;<a href="mailto:fruehbeck@aon.at" target="_blank">fruehbeck@aon.at</a>&gt; wrote:<br>
</blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hi,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">after having a look at receipt at<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://forge.github.com/docs/get_involved/contribute.html" target="_blank">http://forge.github.com/docs/get_involved/contribute.html</a> I would like<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">to clarify the use the repositories.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite">    - I have cloned forge/core to a private github repository<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">    - cloned my repository to my local system<br></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite">    - generated a branch, committed changes, pushed to my github<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">repository<br></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite">All OK.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">
One thing is left: how will I get updates of the master forge/core into<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">my _remote_ repository, as there is no &quot;pull&quot; on github?<br></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">If I understood correctly, I can associate the remote master by &quot;git<br></blockquote>
</blockquote><blockquote type="cite"><blockquote type="cite">remote add upstream &lt;git_master_repo&gt;&quot;<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">To get the changes of the &quot;upstream&quot; master I issued:<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">~&gt; git pull upstream master<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite">Now my local repository was up do date, but not my remote repository. So<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I issued:<br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite">~&gt; git push<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">which seemed to update my private _remote_ repository with the changes<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">from the remote &quot;upstream&quot; master.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">So for me this means, that from now on I &quot;remote control&quot; my private<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_remote_ repository via my _local_ repo.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote>
<blockquote type="cite"><blockquote type="cite">Could you kindly comment/confirm/explain in more detail.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">
<blockquote type="cite">Thanks,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thomas<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite">forge-dev mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
</blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote>
</blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">
Lincoln Baxter, III<br></blockquote><blockquote type="cite"><a href="http://ocpsoft.org" target="_blank">http://ocpsoft.org</a><br></blockquote><blockquote type="cite">&quot;Simpler is better.&quot;<br></blockquote><blockquote type="cite">
<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">forge-dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
</blockquote><blockquote type="cite"><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br></blockquote><blockquote type="cite"><br></blockquote>
<br>_______________________________________________<br>forge-dev mailing list<br><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
</div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br></blockquote></div><br></div>