Skip to main content

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

Project description

Build Status Coverage Status Build status pypi versions pypi format PyPi Download stats

Git Utilities

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.

A very important feature in

ListAllGithubRepos

is showing which forks of your repos have had changes "ahead of" your code. This shows your code is being improved, even if the forked repo didn't make a pull request. I don't know of any other easy way out there to find this.

Install

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
python -m pip install -e . 

Usage

I didn't know of any other easy ways to do these Git tasks:

  • 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 list all contributor email addresses. Optionally, amend email addresses for prior Git commits

GitHub

ListAllGithubRepos
Gives stats on GitHub repos for a particular user. It requires extra prereqs via:

pip install -e .[github]

Sync large number of git repos

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

  • gtps check if any repos have pending changes
  • gtpl Git pulls all repos
  • gtft Git fetches all repos

You can place an empty file .nogit in a subdirectory to skip pull or push.

Preview all changed Jekyll files

This is for a website made using Jekyll:

ActOnChanged -j

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

gitutils-1.1.3.tar.gz (6.7 kB view hashes)

Uploaded Source

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