gitman

by jacebrowning

jacebrowning / gitman

Language-agnostic dependency manager using Git.

130 Stars 18 Forks Last release: about 2 months ago (v2.1) Other 641 Commits 37 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Overview

GitMan is a language-agnostic dependency manager using Git. It aims to serve as a submodules replacement and provides advanced options for managing versions of nested Git repositories.

demo

Unix Build Status Windows Build Status Coverage Status Scrutinizer Code Quality PyPI Version PyPI License

Setup

Requirements

Installation

Install this tool globally:

$ pip install gitman

or add it to your Poetry project:

$ poetry add gitman

Configuration

Generate a sample config file:

$ gitman init

or manually create one (

gitman.yml
or
.gitman.yml
) in the root of your working tree:
location: vendor/gitman

sources:

groups:

  • name: code members:
    • framework
    • trufflehog
  • name: resources members:
    • fontawesome
    • material-design-icons

Ignore the dependency storage location:

$ echo vendor/gitman >> .gitignore

Usage

See the available commands:

$ gitman --help

Updating Dependencies

Get the latest versions of all dependencies:

$ gitman update

which will essentially:

  1. Create a working tree at
    /
    /
    
    
  2. Fetch from
    repo
    and checkout the specified
    rev
  3. Symbolically link each
    /
     from 
    /
     (if specified)
  4. Repeat for all nested working trees containing a config file
  5. Record the actual commit SHAs that were checked out (with
    --lock
    option)
  6. Run optional post-install scripts for each dependency

where

rev
can be:
  • all or part of a commit SHA:
    123def
  • a tag:
    v1.0
  • a branch:
    main
  • a
    rev-parse
    date:
    '[email protected]{2015-06-18 10:30:59}'

Alternatively get the latest versions of certain dependencies or even dependency groups:

  • Update a single repository
$ gitman update framework
  • Update a dependency group
$ gitman update resources

Restoring Previous Versions

Display the specific revisions that are currently installed:

$ gitman list

Reinstall these specific versions at a later time:

$ gitman install

Deleting Dependencies

Remove all installed dependencies:

$ gitman uninstall

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.