Skip to main content

Manages git repos within git repos.

Project description

# Python Multigit

A Python version of the [multigit Bash script](https://github.com/jmnavarrol/simplest-git-subrepos).

While the multigit Bash script at [simplest-git-subrepos](https://github.com/jmnavarrol/simplest-git-subrepos) was created for illustration purposes, this one is intended to be a full-fledged implementation.

The general idea is to offer a simple way of managing “workspaces” integrating multiple git repos starting from a top one, and without the need of difficult “arcanes” like git submodules, git-subtree, etc.: you only need to declare your intended layout in a YAML file, and let this script do its job. See the [simplest-git-subrepos README](https://github.com/jmnavarrol/simplest-git-subrepos) for a long-wired explanation.

## usage multigit expects a YAML file named subrepos on the root directory of the current repo (see [example](./subrepos)).

For each defined subrepo, it will clone/checkout it to the defined relative path. Optionally, it will checkout the given gitref, provided the repo’s local sandbox is “clean” (i.e. no pending modifications).

NOTE: pay attention to the fact that if the gitref you record is a specific commit, the related sandbox will be in disconnected state.

multigit will also recursively look for new subrepos files on the repositories it manages.

You should make sure your [.gitignore file](./.gitignore) ignores all your subrepos.

This way you just need to manage your repos with git in the standard way, just as if they were individually checked out in isolation.

## development For development purposes, you should create a Python 3 virtualenv using [the companion requirements file](./requirements.txt), i.e. (I’m using [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io) here): mkvirtualenv –python=$(which python3) -r requirements.txt python-multigit.

Then, you can run this code by means of [the helper cmd script](./python-multigit-cmd.py), i.e.: ./python-multigit-cmd.py.


### License Python Multigit is made available under the terms of the GPLv3.

See the [license file](./LICENSE) that accompanies this distribution for the full text of the license.

Project details


Download files

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

Source Distribution

multigit-0.1.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

multigit-0.1.2-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file multigit-0.1.2.tar.gz.

File metadata

  • Download URL: multigit-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.3

File hashes

Hashes for multigit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1fe288e3713cb830b718dc21a654e26099311448afd62358efb3054aa7c8b324
MD5 657754c848bb83b6353003667c4d9a59
BLAKE2b-256 6f1f66b94af02a8baeaa349974ae528068567fded08b61fd8ec9aa0d6d8cf9ce

See more details on using hashes here.

File details

Details for the file multigit-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: multigit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.3

File hashes

Hashes for multigit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20c548631526d80e9b6837d922a49e10b0f9cf938344ff7e79bd3217fda982a7
MD5 db1aea4016e6f55f20788f8a05a9ec77
BLAKE2b-256 b08af6369d0b343c24f979b27964b97f944969f2245607afd887ddb25761753f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page