If we want to use github repository in our projects, we can use it in two different ways: (1) by using git submodule (2) by adding the repository as a git package in the dependency file.
How to choose between two approaches?
If we want to use github repository in our projects, we can use it in two different ways: (1) by using git submodule (2) by adding the repository as a git package in the dependency file.
How to choose between two approaches?
Copyright © 2021 Jogjafile Inc.
git submodule= A feature ofgit, whereby you can add the repository as essentially embedded inside your own repository. This is usually only used when you own the embedded repository. Official description (more info):git package= Depends on the environment you're working in as this doesn't seem to be standard, but this is likely just adding the dependency as a third party library. This is almost always what you will want.One way to think of it is using submodules means git controls your dependency. Using packages means whatever framework you are using controls your dependency. This is usually best.