Command-line Interface

After setting up gitman with a configuration file, various commands can be run to manage these Git-controlled source dependencies.

Install

To clone/checkout the specified dependencies, run:

gitman install

or filter the dependency list by directory name:

gitman install <name1> <name2> <etc.>

or limit the traversal of nested dependencies:

gitman install --depth=<count>

It will leave untracked files alone. To delete them, run:

gitman install --clean

It will only fetch from the repository if needed. To always fetch, run:

gitman install --fetch

It will exit with an error if there are any uncommitted changes in dependencies. To overwrite all changes, run:

gitman install --force

Update

If any of the dependencies track a branch (rather than a specific commit), the current upstream version of that branch can be checked out by running:

gitman update

or filter the dependency list by directory name:

gitman update <name1> <name2> <etc.>

or limit the traversal of nested dependencies:

gitman update --depth=<count>

This will also record the exact versions of any previously locked dependencies. Disable this behavior by instead running:

gitman update --no-lock

or to additionally get the latest versions of all nested dependencies, run:

gitman update --all

List

To display the currently checked out dependencies, run:

gitman list

or exit with an error if there are any uncommitted changes:

gitman list --no-dirty

The list command will also record versions in the log file.

Lock

To manually record the exact version of each dependency, run:

gitman lock

or lock down specific dependencies:

gitman lock <name1> <name2> <etc.>

This can be combined with updating dependencies by running:

gitman update --lock

To restore the exact versions previously checked out, run:

gitman install

Uninstall

To delete all dependencies, run:

gitman uninstall

If any dependencies contain uncommitted changes, instead run:

gitman uninstall --force

Show

To display the path to the dependency storage location:

gitman show

To display the path to a dependency:

gitman show <name>

To display the path to the configuration file:

gitman show --config

To display the path to the log file:

gitman show --log

Edit

To open the existing configuration file:

gitman edit