How to link reference libraries in git repository?


I have been looking into solution that how can I link my pre-compiled dlls into different projects in git repositories, and, I don’t want to copy dependencies code always in each repository. 

 

Drawing

This can be achieved by creating Git sub-module in repository where you want to use it.

Following steps need to be done:

 

Step 1: Go on top level directory where sub module needs to link:

 

$ cd <local path of git repo> 

cd c:/bitbucket/mylocalrepository 

Step 2: Create submodule in repository:

git submodule add path_to_repo path_where_you_want_it
$git submodule add http:/githubrepo/repository.git Repositories

This will create submodule in lib folder of my local repository.

When you want to update to a newer version of one of the libraries, cd into the submodule and send pull request:

cd Repositories
git pull
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: