Skip to main content

A multi-repo manager for git

Project description

Design Goal

I wanted a tool to help manage logging into lots of systems with lots of files and tools that need to be in lots of places. But some systems are for work, others for play, others for photography, etc. And a different collection of files are needed on each system. How can I manage some systems that are both photography and play but not work? What can do I when switching between them?

git soc is going to be the answer.

Pre-reqs

For linux:

- python3-GitPython
- python3-PyYAML

Usage available today:

# cd ~/src/
# git clone https://github.com/hardaker/git-soc.git
# cd git-soc
# git soc register github/git-soc
-- registering ~/lib/git-soc.d/work/github.yml

# cd ~/lib/org
# git soc register personal/org
-- registering ~/lib/git-soc.d/personal/org.yml

# cd ~
# git soc status
/home/hardaker/lib/org                                        
/home/hardaker/src/git-soc                                   d<>
                                                             (d = dirty)
                                                             (> = needs push)
                                                             (< = needs merge)

# git soc push
/home/hardaker/src/git-soc                                   fae63ca..0bb41cb
/home/hardaker/lib/org                                       [up to date]

# git soc fetch
/home/hardaker/lib/org                                       pulled
/home/hardaker/src/git-soc                                   won't: dirty

# git soc pull
/home/hardaker/lib/org                                       92e6422..831ba44
/home/hardaker/src/git-soc                                   won't: dirty

# git soc pushpull
... the same as both the above two commands ...

# git soc cmd -a -s "ls .git"
running command: ls .git
--- /home/hardaker/lib/org
Run here:  (y)es [default], (n)o, (q)uit: y
running 'ls .git' in /home/hardaker/lib/org
branches	config	     FETCH_HEAD  hooks	info  MERGE_RR	ORIG_HEAD    refs
COMMIT_EDITMSG	description  HEAD	 index	logs  objects	packed-refs  rr-cache
--- /home/hardaker/src/git-soc
Run here:  (y)es [default], (n)o, (q)uit: y
running 'ls .git' in /home/hardaker/src/git-soc
branches	    COMMIT_EDITMSG.~2~	 config       HEAD   info      objects	    refs
COMMIT_EDITMSG	    COMMIT_EDITMSG.~30~  description  hooks  logs      ORIG_HEAD    rr-cache
COMMIT_EDITMSG.~1~  COMMIT_EDITMSG.~31~  FETCH_HEAD   index  MERGE_RR  packed-refs

Registration flags:

These registration flags are supported today:

auto_commit: true/false (default = false)

Auto-commits any outstanding chasges; useful constantly saved settings, files, emacs org files, etc.

clone: true/false (default: true)

Whether or not to clone a repository if it doesn't exist. By default, things are cloned but a repo YAML file may set "clone: false" to disable it from being pulled if it doesn't exist.

Usage to be done

  • sync
    • ... [interactive commit/add/push/pull] ...
  • add known files
  • annex support
  • register with other arguments
    • auto_add

(Eventual) Features

  • Easy registration of new repos
  • Supports git annex for large files
  • Interactive (none of the other available options listed below are)
  • Config files for repos in individual files
    • (easier to sync portions of repo sets around, rather than one monolithic config file)
  • Easy configuration (automatic but editing yaml is possible if needed)
  • Support for bootstrapping with ansible
  • ideally multiple-commands at once in the background, stopping for interative when needed on some repos
  • Startup from just a set of yaml files retrieved from another system (after a new yaml files are found, it should auto-clone everything needed)

Why not others

Right now a number of other projects exist to manage a large collection of git repos, but they all don't quite match what I needed, so I'm starting a new one.

  • antlink - great for managing a single tree of a lot of repos, with support for partial tree-branch checkouts (the default) and grafting of external gitrepos. Still a single place for a tree root to exist (though you could symlink in). Doesn't support git annex. We hope to support antlink sub-trees within git-soc. Antlink is somewhat similar to but different than:

  • repo - the repo management tool for the android toolkit. Again, a large-tree collection but with poor documentation.

  • myrepos

  • gr:

  • mu: if there was one I would emulate as much as possible, it's this one. It's support for parallelism is something I want to copy. But that has no interactive support and it's configuration isn't splittable.

  • gitsync: I used this for a while and it supports a good registration mechanism, but is entirely automatic and doesn't support annex.

other good reading

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

git_soc-0.1.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

git_soc-0.1-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file git_soc-0.1.tar.gz.

File metadata

  • Download URL: git_soc-0.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for git_soc-0.1.tar.gz
Algorithm Hash digest
SHA256 ad6593bda3f3591bf1d368d5a880fe9131d4736886e392b142ec02b2d5737f0e
MD5 b8ab995d3622b65abc0b068eb6d7ae43
BLAKE2b-256 cc391f7b471b81c369c0f85042b05ec25912006bb0867656873c2f838d18eb7e

See more details on using hashes here.

File details

Details for the file git_soc-0.1-py3-none-any.whl.

File metadata

  • Download URL: git_soc-0.1-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for git_soc-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05013b20e482c474c8a0fbc428392ba737cecf07514213da8228479ccac15b3f
MD5 72329df20bc5f23e4a0e08e3a5038175
BLAKE2b-256 71d785ee90593e171417a816bc6d6d0fdb6835dd86f03e6a1657428fec2c99c9

See more details on using hashes here.

Supported by

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