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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file git-cat-1.0.0.tar.gz.

File metadata

  • Download URL: git-cat-1.0.0.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for git-cat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3c43713c9970cafb8a5b322ce322692d83061d24976e5c71d18f23f21ee8d429
MD5 da524e2f62c90094fb2c730fabc3371f
BLAKE2b-256 90e67696c5f58abe2d8c68aada24a677d82066bf4d9ed20f629f4dd9791a158f

See more details on using hashes here.

File details

Details for the file git_cat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: git_cat-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1

File hashes

Hashes for git_cat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 56777d8ae8bda0b3fdd9aec58f7cca42fa147a88d64d42ad33371ff83dcf4d2b
MD5 7dc89126ca5c859f7a6b5a71ad4414ed
BLAKE2b-256 d766de0863cd69c6438b4e42f0ab18d29aac32b697ef9bc1501ff8a70838549a

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