[oi-dev] Pull request : how to get back on track (git lost)

bentahyr at chez.com bentahyr at chez.com
Mon Mar 21 02:44:36 UTC 2016


Thanks Aurélien, 
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. 


So here I am with my 2 branches (Maybe I should think about naming branches) : 
$ git branch 
libconfig 
* oi/hipster 
sslh 

$ git show-branch --topo-order 
! [libconfig] Use of $(MACH64) in p5m file 
* [oi/hipster] Add component libconfig as a requirement for sslh 
! [sslh] Update license headers from Opensolaris to Illumos CDDL Clean Makefile of unnecessary bits Clean p5m of unnecessary bits p5m generated from Makefile info Patch to sslh Makefile includes not compressed man page SMF manifest has been stripped out of unnecessary things SMF method script has been completely rewritten 
---- 
+ [sslh] Update license headers from Opensolaris to Illumos CDDL Clean Makefile of unnecessary bits Clean p5m of unnecessary bits p5m generated from Makefile info Patch to sslh Makefile includes not compressed man page SMF manifest has been stripped out of unnecessary things SMF method script has been completely rewritten 
+ [sslh^] No need to specify SMG FMRI, defined by XML file 
+ [sslh~2] Remove unused commented properties 
+ [sslh~3] Consistency between hardcoded configuration file lookup and method 
+ [sslh~4] Add component sslh 
+ + [libconfig] Use of $(MACH64) in p5m file 
+ + [libconfig^] Change license header from Opensolaris to Illumos CDDL 
+ + [libconfig~2] Removed dir actions Added tabs to aligned action parameters 
+ + [libconfig~3] Fixed P5M file : - build from make sample-manifest - remove .a .la files - include 64bits files as well 
+ + [libconfig~4] Add component libconfig as a requirement for sslh 
* [oi/hipster] Add component libconfig as a requirement for sslh 
+*+ [libconfig~5] Use of in p5m file 
++*+ [libconfig~6] Update license headers from Opensolaris to Illumos CDDL Clean Makefile of unnecessary bits Clean p5m of unnecessary bits p5m generated from Makefile info Patch to sslh Makefile includes not compressed man page SMF manifest has been stripped out of unnecessary things SMF method script has been completely rewritten 

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. 
Pfiuu, I have to admit that I spend more time to do git/github stuff than actually "doing work". 
As Jim said, there's many schools so you can find documents out there that through you in many various direction. 

Best regards. 
Ben 

On 21/03/16 12:32, Aurélien Larcher wrote: 



Hello, 





<blockquote>
Hi, 

I have hard time to get through the git way of doing things right now. 

So, I forked oi-userland, added components or changes to it and did a pull request. 
Ok, I understand that I should have done one component at a time. 





Whenever there is a dependency of said component at build time yes: PR the dependency first. 


<blockquote>
It seems that the git way of doing this is to create one branch per component which I haven't done. 

Now I have all my commits in oi/hipster and how can I reach the situation where I can pull request one component only ? 

</blockquote>



In your case it is easy because there is no dependency between commits. 

I would say the easiest is to create a new branch (git checkout -b libconfig) and git cherry-pick the commits related to libconfig. 

<blockquote>
Is branching per component the best way to make pull request ? 

</blockquote>



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. 

If you think how the build server works it makes sense. 



<blockquote>

Best regards. 
Ben 


</blockquote>

</blockquote>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20160321/fd81fc95/attachment-0005.html>


More information about the oi-dev mailing list