git - Strategy for maintaining shared code between projects? -


i have 5 or 6 projects use "toolkit" code i've written. problem i've came across doing updates toolkit code; when update need apply these updates manually other projects.

is there common strategy handling kind of issue?

you can use git submodules.

create repository "toolkit" code , use submodule each of other projects. add submodule, can do:

$ git submodule add url_to_repository path_to_local_submodule

when cloning repositories submodules, there steps required:

$ git submodule init and

$ git submoudule update

it fetch repositories submodules , checkout appropriate commit of each.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -