Skip to main content

Scan local or remote git repositories for history divergent from origin

Project description

Git-Scan

Git-Scan is a command-line utility to scan local or remote git repositories for history that is divergent from the remote branch. It is particularly useful when dealing with multiple git repositories across multiple machines where pulls and pushes are missed, stashes are forgotten about, files are left untracked, etc.

Features

  • Scan repositories for missing push & pulls, uncommited changes, untracked files, leftover stashes, and dangling branches
  • Automatically pull or push a group of repositories
  • Open repositories in need of changes in TMUX windows
  • Execute over SSH to git-scan on a different computer
  • Configuration file to list scannable repositories

Usage

To run a git-scan

git-scan [--push] [--pull] [--repo] [--tmux] [--ssh]

where the optional arguments are

  • push: push repository changes if ahead of remote
  • pull: pull repository changes if behind remote and there are no merge conflicts
  • repo: list of repositories to scan (defaults to all in the configuration file)
  • tmux: open all repositories with problems to fix in a TMUX window
  • ssh: run the git-scan on the provided ssh host

To add a repository to the list of scannable repositories

git-scan add /path/to/repository

To remove a repository

git-scan remove /path/to/repository

To list all scannable repositories

git-scan list [--resolve]

Installation

Git-Scan can be installed with pip

pip install git-scan

If installed with the --user flag, make sure to add ~/.local/bin to your PATH

Configuration File

A configuration file located at ~/.config/git-scan/git-scan.conf is created. This is a TOML file listing the scannable repositories:

repositories = ["/path/to/repository_1", "/path/to/repository_2"]

The config file can be editted manually or changed using the add and remove commands. Glob patterns and tilde expansions are allowed, i.e. "~/path/to/repos/*"

License

Git-Scan is licensed under the terms of the MIT license.

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-scan-0.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_scan-0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file git-scan-0.2.tar.gz.

File metadata

  • Download URL: git-scan-0.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for git-scan-0.2.tar.gz
Algorithm Hash digest
SHA256 5604d402c2ac40974928b606ee3a017f3c3f5843158715a8d8e9b80e50527f25
MD5 97561d6af862d90a49688fd16a0fda7d
BLAKE2b-256 a17fe37d0d60cf05a641f1b350abeecdd7bc4b08e6ccbd2787fb72172831da3f

See more details on using hashes here.

File details

Details for the file git_scan-0.2-py3-none-any.whl.

File metadata

  • Download URL: git_scan-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for git_scan-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 92709c0333a8b4da4cf18944221b8c34a77c14b63a1c726075074b3f1ff66ed9
MD5 62a16d53bd666723d2b76b60c1bdc4e4
BLAKE2b-256 0470e4bf0dc03bccf518417fe5fa08488f20b2e19ba5fcc4b0caf19854b8fd21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page