Skip to main content

GitCat: herding a catalogue of git repositories

Project description

version pyversion GPL3

git cat

Herding a catalogue of git repositories

usage: git cat [-c CATALOGUE] [-p PREFIX] [-q] [-h] [-m MOVETO]

<command> [options] …

Simultaneously synchronise multiple local and remote git repositories

Optional arguments:
-c CATALOGUE, --catalogue CATALOGUE

specify the catalogue of git repositories (default: /Users/andrew/.dotfiles/config/gitcatrc)

-p PREFIX, --prefix PREFIX

Prefix directory name containing all repositories

-q, --quiet

Print messages only if repository changes

-h, --help

help: for extended help use -hh and -hhh

-m MOVETO, --moveto MOVETO

Move repository to specified position in catalogue

Commands:

add               Add current repository to the catalogue
branch            Print status of all branches in each repository
commit            Commit changes in all repositories
diff              Print a diff of the changes in each repository
fetch             Fetch all repositories from remote repositories
install           Install repository from the catalogue
ls                List all repositories in the catalogue
pull              Pull all repositories from remote repositories
push              Commit and push local repositories to remote repositories
remote-set-ssh    Change all remote URLs to use ssh access
rm                Remove repository from the catalogue
status            Print the status of all repositories

git cat is a command line tool for synchronising multiple git repositories with remote servers from the command line. This tool is not intended to be used on large projects with multiple developers but, instead, it is aimed at the lone developer who has wants to synchronise multiple git repositories that live on several computers. In particular, with one git cat command you can run git commands on multiple git repositories, such as pushing or pulling from remote servers, such as bitbucket and github. When pushing, any local changes to the repositories will be automatically commited.

git cat provides only a thin veneer over git. It does not support all git commands and nor does it support the full functionality of those git commands that it does support. The git cat philosophy is to “do no harm” so, when possible, it uses dry-runs before changing any repository and it will only change a repository if the dry-run succeeds. Any problems encountered by git cat are printed to the terminal (stdout). The aim of git cat is to streamline the management of multiple git repositories so, by default, it prints a summary of what it does to each repository to the terminal.

By default, the git cat commands are applied to all of the repositories that are managed by git cat, however, repositories that the command is applied to by supplying a regular expression.

Examples:

> git cat pull # pull from all repositories > git cat pull Code # pull from all “Code” repositories

This makes it possible, for example, to push or pull from related git repositories that are in different directories.

The remote repositories are accessed in the normal way using git. Ideally, they will be set up with ssh access so that passwords are not required. If git requires a password for a repository then you will be prompted to supply it in the usual way.

The gitcatrc file

The gitcatrc file contains the catalogue of repositories maintained by git cat. This file will be stored in the directory ~/.dotfiles/config, if it exists, and otherwise it defaults to ~/.gitcatrc. This location of this file can be changed from the command line using the -c command line option.

The git cat commands are only applied to those repositories that have been “installed” using git cat install. Consequently, if the gitcatrc file is itself in a git repository then different computers that use this file can synchronise different repositories using git cat.

Author

Andrew Mathas Mathas

git cat version 1.0.0

Copyright (C) 2018-2020


GNU General Public License, Version 3, 29 June 2007

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

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

git-cat-1.0.0.tar.gz (47.5 kB view hashes)

Uploaded Source

Built Distribution

git_cat-1.0.0-py3-none-any.whl (20.7 kB view hashes)

Uploaded Python 3

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