github - How to use git submodule with a 3rd party library? -


i want add 3rd party lib on github git submodule project i'm working on.

since library can change, , changes out of hands, wondering best practice using submodule.

the options had in mind are:

  1. forking lib , using sub module ensure no changes harm project.
  2. using specific version's branch/tag (is possible) submodule

is 1 of these options recommended way go? there better way aside these options?

  • if library owner publish packages, might easier use language manager: you'll have update version number want use when new package available.

  • otherwise, using submodules (or subtree) might option. stated in comments, you'll still choose commit of library want use, , you'll update whenever choose to.

as example, project used successively both solutions: started submodules, , eventually referenced library maven package.

note using submodules, you'll end cloning library in workspace, there's not point in wondering if need fork library.


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 -