Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Clone and Maintain an entire hierarchy of Git repositories in one command

Project description


Travis PyPI

Hierarchy is a simple tool that allows you to clone and maintain an entire hierarchy of Git repository in one single command:

$ hierarchy

TODO: Add picture of hierarchy in action


  1. Install

    $ pip install hierarchy
  2. Create the Hierarchy file

    $ nano ~/.hierarchy

    Sample Hierarchy File

      - path: ~/Dev/CliTools
      - path: ~/Dev/CliTools
      - path: ~/Dev/CliTools/DevOps
      - path: ~/Dev/HomeAutomation
        name: appdaemontestframework
  3. Run Hierarchy

    $ hierarchy

Hierarchy file structure

The Hierarchy file represent the flat hierarchy of all the git repository to clone and maintain.

It consists of a list of entries, under the key repos, each representing a repository to clone.


Each repository has the following structure:

url: "URL of the project. The same used to clone the repository with `git clone`"
path: "The local path where to clone the repository. It can contain `~` to represent HOME"
name: "OPTIONAL - A name to override the default repository name when cloning"

The repository will be cloned at: path/name
If no name is provided, the repository name will be used.

A sample Hierarchy file might look like this:

  - path: ~/Dev/CliTools
  - path: ~/Dev/CliTools
  - path: ~/Dev/CliTools/DevOps
  - path: ~/Dev/HomeAutomation
    name: appdaemontestframework


  • -f / --file HIERARCHY_FILE

    A hierarchy file to use.
    Default: ~/.hierarchy

  • -v / --verbose

    Enable verbose mode

  • --help

    Show help

Work In Progress

  • [x] Allow for ~ in the path
  • [x] Create directories if do not exist
  • [ ] Clone with all submodules
  • [ ] If directory exists and not empty:
    • [ ] Is not same repo => Skip and notify user (ERROR)
    • [ ] Is not repo => Skip and notify user (ERROR)
    • [ ] Is correct repo:
      • [ ] Has no local modifications and up to date with remote =>
        • [ ] Update (pull)
        • [ ] Update with all submodules
      • [ ] Has local modifications => Skip and notify user (WARN)
      • [ ] Is not up to date with remote => Skip and notify user (WARN)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hierarchy, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size hierarchy-0.4.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page