Submodules

Submodules
Login

Submodules

Handle project dependencies from other SCMs (e.g. git) inside the project directory. At the moment, it's all git for the dependencies, though the base repository can be any SCM you want, e.g. fossil.

The information about those "submodules" is stored in a file named .submodules.json, which should be checked in.

Installation

This can be used as a dotnet tool, for example:

dotnet pack
dotnet tool install --global --add-source ./Submodules/nupkg submodules

More info on how to play with dotnet tools.

This command for uninstall the global tool may come in handy:

dotnet tool uninstall --global submodules

There shell scripts that handle this, like install_globally.sh.

Basic Usage

After the installation, you can invoke the tool like so:

C:\Users\user\source\repos\Submodules> submodules help

    Usage: submodules <cmd>

    Where <cmd> is one of the following:

    clone -> Clone all submodules (recursively).
    status -> Print a short status of each submodules (recursively).
    branch -> Print the branch name of each submodule (recursively).
    fixate -> Stores the commit of each direct submodule with a clean status in .submodules.json.
    checkout -> Checks out each submodule with a clean status to the known commit.

Nothing to do for <submodule>, no command given (C:\Users\user\source\repos\Submodules).

Development

This is the current canonical fossil repo URL, in case you are looking at a fork or git clone.