Git User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Organizing Code for git Repositories

Hello all,

Not sure if this is the best place to put this, but since it is git focused I thought - why not??!! 

So, I am currently hosting my code in a subversion monorepository and am getting ready to move all of this code to github (coporate account).  I would like to organize it so that users of git can take portions of the code for their project without having to grab the whole (massive) code base. To this end, I will be breaking out my code into individual repositories that might reference others as submodules. 

In conjunction, I have some base code that I use (placed in a generic folder called reusable) in almost every project (to some extent) but rarely modify.  I was thinking that I would wrap this code in vipm modules for deployment to the user or vi.lib folders.  So, I would place the reusable code in a single repo but reference the deployed modules in the calling code.

Does any of this make sense?  Does anyone have any comments regarding this?  Does anyone have a comment about  best practices?

Thanks.

Message 1 of 5
(6,238 Views)

hello and happy new year,


I have the same question about the management of the user lib and the best practices
thank you

 

0 Kudos
Message 2 of 5
(5,707 Views)

So, a year on and I thought I should update on my efforts.  I have subdivided my code into repositories that make sense to me based on how I code.  The largest single repository (which could probably be broken up) is a repo filled with reusable items.  Everything that I do builds on this repo and requires it for functionality.  I package all of this code into a single VIPM which is deployed at vi.lib.  All high level code points to the library at vi.lib.  Other code that is generic is also hosted in individual repositories and may or may not call this reusable repository.  The generic functionality includes stuff like device/instrument communication - it is reusable but everyone who uses the reusable library may not necessarily need this functionality.  This generic functionality is also packaged into vipm modules for deployment in vi.lib.

My high level code is logically grouped into individual repositories but is not packed in vipm as this is not code that will be reused.  If anyone wants to see a more detailed explanation as to what is in repositories and packages, let me know and I might put together a blog post or something.

Message 3 of 5
(5,658 Views)

Please show us what you have done in more detail.

0 Kudos
Message 4 of 5
(5,546 Views)

I am trying to accomplish something similar. I am a newbie.

I am trying to figure out how to package the NI and third parties support components, drivers, typically installed in C:\, into a repository that can be submoduled by other application repos so the code is all contained within GIT. Very interested on your approach.

0 Kudos
Message 5 of 5
(5,180 Views)