On Sat, May 7, 2011 at 9:28 AM, Tim Sutton <span dir="ltr"><<a href="mailto:lists@linfiniti.com">lists@linfiniti.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<div class="im"><br>
On Sat, May 7, 2011 at 6:03 PM, Mayeul Kauffmann<br>
<<a href="mailto:mayeul.kauffmann@free.fr">mayeul.kauffmann@free.fr</a>> wrote:<br>
> Hi,<br>
> Thanks all for your hints. Still, I could not find a way to make those<br>
> changes on existing branch and on the pull request #3, so I forked again and<br>
> added a new pull request:<br>
<br>
</div>Ok no need to refork, you can just do (in your local repo):<br>
<br>
git remote add qgis-upstream git://<a href="http://github.com/qgis/Quantum-GIS.git" target="_blank">github.com/qgis/Quantum-GIS.git</a><br>
git fetch qgis-upstream<br>
git branch --track release-1_7_0 origin/release-1_7_0<br>
git checkout release-1_7_0<br>
git pull qgis-upstream release-1_7_0<br>
git push origin release-1_7_0<br>
<br>
That will pull any changes from qgis repo and push them up to your<br>
clone of it. Obviously you need to commit any fixes you made in<br>
response to the comments and push those too. Then just issue a new<br>
pull request and cancel the old one.<br>
<br>
I will write up some working practice docs in CODING soon I promise :-)<br>
<br>
Regards<br>
<br>
Tim</blockquote><div><br></div><div>Although it is *strongly* recommended to create a separate branch for each feature. For example, if you only use a release-1_7_0 branch:</div><div><br></div><div> git branch --track release-1_7_0 origin/release-1_7_0</div>
<div><br></div><div>And work on two features, x and y you will have a problem when opening pull requests from that branch:</div><div><br></div><div> The pull request for feature x will contain all commits for feature y and vice versa.</div>
<div><br></div><div>A better method would be:</div><div><br></div><div> git checkout -b feature/x --track origin/release-1_7_0</div><div> git checkout -b feature/y --track origin/realease-1_7_0</div><div><br></div>
<div>
That sets up both branches so that `git pull` will bring in upstream changes, yet changes made by `git commit` are segregated. Pull requests opened from `feature/x` will only contain commits related to x.</div><div><br></div>
<meta charset="utf-8"></div>