Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

cross-platform git utilities for managing a large number of git repositories quickly

Project description

https://travis-ci.org/scivision/pygitutils.svg?branch=master https://coveralls.io/repos/github/scivision/pygitutils/badge.svg?branch=master https://ci.appveyor.com/api/projects/status/peeed6kh6p59w4kb?svg=true Maintainability

pygitutils

Platform-independent (Linux/Mac/Windows) Git utilities, useful for managing large (100+) numbers of Git repos. I use command-line git because PyGit also requires command-line Git installed, and I don’t need the advanced functionality.

For embedded systems using system Python such as the Raspberry Pi, you can set the default Python to Python 3 using update-alternatives.

Prereq

Install Git in a way accessible from the command line line

  • Mac: brew install git
  • Linux: apt install git
  • Windows: command line Git.
  • BSD: pkg install git

Install

python -m pip install -e .

Sync large number of git repos in subdirectories

These assume numerous subdirectories under ~/code or c:\code. They work very quickly for large numbers (100+) repos

program description
gtps.py check if any repos have pending changes
gtpl.py git pull all repos
gtft.py git fetch all repos

You can place an empty file .nogit in a subdirectory if you don’t want it to be checked for pull or push. For gtps.py, the changed files are noted–you have to cd to that directory and commit/push as usual.

Program listing

Program Function
gtpl.py Pulls all git repos under directory [~/code]
gtps.py Pushes ” ” ” ” ” “
gtft.py Fetches ” “
gitbranch Tells of any non-master branches under directory [~/code]
git_filemode_windows Sets all git repos to don’t care permissions under directory [~/code]
gitemail.py list all contributor email addresses. Optionally, amend email addresses for prior Git commits
ActOnChanged.py print list of changed files OR run a program to edit/view them

Preview all changed Jekyll files

This is for a website made using Jekyll:

ActOnChanged.py --jekyll

Project details


Release history Release notifications

This version
History Node

1.1.0

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
pygitutils-1.1.0-py3-none-any.whl (12.0 kB) Copy SHA256 hash SHA256 Wheel py3 Apr 19, 2018
pygitutils-1.1.0.tar.gz (6.6 kB) Copy SHA256 hash SHA256 Source None Apr 19, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page