<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:rgb(0,0,0)">
  
    
  
  
    <div>Thanks Aurélien,<br>
      Considering the number of commits and the size of the components
      it was easier to cherry-pick one commit at a time rather than
      rebase or other bulk method.<br></div></div></div></blockquote><div><br></div><div>Yup yup yup.<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:rgb(0,0,0)"><div>
      <br>
      But I'm not sure of where I am because when I try to create a pull
      request on github on a specific branch, I can see all the commit
      from the other branch.<br></div></div></div></blockquote><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:rgb(0,0,0)"><div>
      Pfiuu, I have to admit that I spend more time to do git/github
      stuff than actually "doing work".  <br></div></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:rgb(0,0,0)"><div>
      As Jim said, there's many schools so you can find documents out
      there that through you in many various direction.<br></div></div></div></blockquote><div><br></div><div>Talking about "schools" makes it sound a bit mystic and gives too much importance to a tool which should be used in a simple manner ;)<br></div><div>The workflow is adapted to the constraints of the build server: send the components in order (of dependency), one chunk at a time.<br></div><div>Additionally, moderate size of PRs helps the reviewer.<br><br></div><div>Do not mess with over-complicated git shenanigans, keep it simple: packaging a component should not require crazy git skills.<br><br></div><div>For any feature/fix:</div><div>1) Resync: `git checkout oi/hipster && git pull --rebase oi/hipster` and *never* commit on this branch to keep it clean,<br></div><div>2) Branch:  `git checkout -b my_component`,<br></div><div>3) Work work work: `git commit -m "N-th iteration" toto babar` for each intermediate states until `gmake clobber && gmake publish` passes and the installed package is functional,<br></div><div>4) Collapse: `git rebase -i HEAD~N` with N number of commits to rewrite (alternatively give the hash of the commit until which you want to rewrite),<br></div><div>5) Push: `git push -f my_origin my_component` (-f forces rewrite of remote, beware camembert ! (tm)),<br></div><div>6) PR.<br></div><div><br>There is no arcane: clone the workspace, address specific issue, clean up workspace, upstream changes. ;)<br>If you need to pull more than these ingredients from git then -- most likely -- something went wrong ;)<br><br></div><div>In that case, provided that packaging a component is a simple task with no dependency and < 10 commits, instead of wasting time and torturing yourself with git manuals and documentation:<br></div><div>1) Create a new branch from oi/hipster: `git checkout oi/hipster && git checkout -b my_component_anew`,</div><div>2) If commits are nicely laid out (i.e one commit == one fix a.k.a Ghostbusters' rule "Do not cross streams"):<br>        `git cherry-pick` the commits from your messy branch<br></div><div>    Otherwise copy the files from the original branch:<br></div><div>        `git checkout my_component -- file0 file1 file2 file3` and commit them in a way that makes sense ;)<br></div><div>3) Collapse,<br></div><div>4) Push,<br></div><div>5) PR.<br><br></div><div>Of course when you work on a component for which a dependent PR is not closed yet, base the stem on the relevant branch.<br></div><div><br>Some random notes from memory: <a href="http://hub.openindiana.ninja/?q=content/quick-start-oi-userland">http://hub.openindiana.ninja/?q=content/quick-start-oi-userland</a><br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:rgb(0,0,0)"><div>
      <br>
      Best regards.<br>
      Ben<span class=""><br>
      <br>
      On 21/03/16 12:32, Aurélien Larcher wrote:<br>
    </span></div><span class="">
    <blockquote>
      <div dir="ltr">Hello,<br>
        <br>
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
                <br>
                I have hard time to get through the git way of doing
                things right now.<br>
                <br>
                So, I forked oi-userland, added components or changes to
                it and did a pull request.<br>
                Ok, I understand that I should have done one component
                at a time.<br>
              </blockquote>
              <div><br>
              </div>
              <div>Whenever there is a dependency of said component at
                build time yes: PR the dependency first.<br>
              </div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                It seems that the git way of doing this is to create one
                branch per component which I haven't done.<br>
                <br>
                Now I have all my commits in oi/hipster and how can I
                reach the situation where I can pull request one
                component only ?<br>
              </blockquote>
              <div><br>
              </div>
              <div>In your case it is easy because there is no
                dependency between commits.<br>
              </div>
              <div>I would say the easiest is to create a new branch
                (git checkout -b libconfig) and git cherry-pick the
                commits related to libconfig.<br>
                 </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                Is branching per component the best way to make pull
                request ?<br>
              </blockquote>
              <div><br>
              </div>
              <div>In general features and fixes should live in separate
                branches yes and one for each component: exception is
                made in case dependencies or lack thereof allow several
                fixes in one PR.<br>
              </div>
              <div>If you think how the build server works it makes
                sense.<br>
              </div>
              <div><br>
                 </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <br>
                Best regards.<br>
                Ben<br>
                <br>
              </blockquote>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  

</span></div></div><br>_______________________________________________<br>
oi-dev mailing list<br>
<a href="mailto:oi-dev@openindiana.org">oi-dev@openindiana.org</a><br>
<a href="http://openindiana.org/mailman/listinfo/oi-dev" rel="noreferrer" target="_blank">http://openindiana.org/mailman/listinfo/oi-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font style="font-family:courier new,monospace" size="1">---<br>Praise the Caffeine embeddings<br></font></div></div></div></div>
</div></div>