Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-repo-scan

A small CLI that recursively finds Git repositories under a directory and reports whether each repo is clean or dirty.

A repo is considered dirty if any of the following is true:

  • No origin remote exists.
  • Current branch is not the repo's "main" branch (origin default, or fallback to main, then master).
  • There are unpushed commits on the main branch.
  • There are staged (but uncommitted) changes.
  • There are unstaged or untracked changes.

Install

Build from source:

go build ./cmd/gitscan

Usage

Scan current directory:

./gitscan

Scan a specific directory:

./gitscan /path/to/scan

JSON output:

./gitscan --json /path/to/scan

Exclude directories by name (comma-separated):

./gitscan --exclude ".git,node_modules,vendor" /path/to/scan

About

Recursively scan directories for Git repositories and report clean/dirty status with actionable reasons (unpushed commits, staged/unstaged changes, wrong branch, missing origin). Includes JSON output.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages