concurrent, pipelined, platform-agnostic Git utilities for managing a large number of Git repositories
Project description
GitMC -- concurrent asynchronous Git Utilities for operations on massive numbers of Git repos
Platform-independent (Linux/Mac/Windows) Git utilities, useful for managing large (100+) numbers of Git repos.
Speed is an emphasis throughout, with concurrency via Python asyncio
and pipelining.
GitMC uses command-line Git because PyGit also requires command-line Git installed, and we don't need the advanced functionality.
Also see PyGit-bulk for managing large (100+) numbers of users / teams.
Install
Install Git in a way accessible from the command line line
- Mac:
brew install git
- Linux:
apt install git
- Windows: command line Git.
python -m pip install -e .
Usage
gitbranch
Tells of any non-master branches under directory ~/codegitemail
list all contributor email addresses. To fix unwanted emails use Git-filter-repofind_missing_file
: find directories missing exact fullpath to filefind_matching_file
: find directories matching exact fullpath to file
Sync large number of git repos
These assume numerous subdirectories under ~/code
.
They work very quickly for large numbers (100+) of repos.
gitstat
check if any local repos have pending changesgitpull
Git pulls all repos (suggestgitfetch
instead)gitfetch
Git fetches all repos, printing a summary of files changed on remote
Place an empty file .nogit
in a subdirectory to skip it.
[optional] speedup with https pull
For public repos, to make the Git remote checking go at least twice as fast, and significantly reduce the computational burden when SSH is used for git push
(as is recommended), consider the "pushInsteadOf" global Git config.
To do this, when cloning a public repo (including ones you're a collaborator on), use git clone https://
.
This global SSH push config one-time does SSH push for HTTPS-cloned repos:
git config --global url."ssh://github.com/".pushInsteadOf https://github.com/
The pattern matching can be made for all sites by omitting github.com
from the command above, or you can refine it for each site, or even for specific usernames by editing the command above.
For private repos, simply clone with SSH as usual
Preview all changed Jekyll files
This is for a website made using Jekyll or Hugo:
ActOnChanged . -p
It shows web page previews of all pages changed locally--start the Jekyll or Hugo debug server first e.g. hugo serve
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitutils-1.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f5a69245fcbd3079d9879b09c0fae5576624aff12b7d7fdd677ed432343ea2 |
|
MD5 | 13ac0d351f1513a7a7e6d2d8dda74c52 |
|
BLAKE2b-256 | e4b0d52d7ca918e57a3181e5111322a76a8585e90df1301444fe4abb6e6f221b |