Skip to content

Latest commit

 

History

History
121 lines (87 loc) · 4.28 KB

File metadata and controls

121 lines (87 loc) · 4.28 KB

uncommitted

A command-line tool that recursively scans directories to find git repositories with uncommitted changes and displays the results in a visually appealing format.

Features

  • Recursively scans directories for git repositories
  • Detects staged, modified, untracked, and deleted files
  • Shows current branch and remote tracking branch
  • Displays ahead/behind status relative to remote
  • Shows remote push status (whether the repo has been pushed to GitHub or other remotes)
  • Color-coded output for easy scanning
  • Unicode box-drawing characters for a clean look

Support This Project

If you find Uncommitted useful, consider buying the developer a coffee!

Buy Me A Coffee

Buy Me A Coffee QR Code

Screenshot

╔══════════════════════════════════════════════════════════════════════════════╗
║ /Users/you/projects/my-app                                                   ║
╠══════════════════════════════════════════════════════════════════════════════╣
║  Branch: main -> origin/main                                                 ║
║  Remote: GitHub (pushed)                                                     ║
║  ↑ 2 ahead                                                                   ║
║  Summary: 3 staged 5 modified 2 untracked                                    ║
╠══════════════════════════════════════════════════════════════════════════════╣
║  File                                      Status                            ║
║  src/app.js                                modified (staged)                 ║
║  src/utils.js                              modified                          ║
║  config.json                               untracked                         ║
╚══════════════════════════════════════════════════════════════════════════════╝

Color Coding

Color Meaning
Green Staged files / Pushed to remote
Yellow Modified (unstaged) / Not pushed
Magenta Untracked files
Red Deleted files / No remote
Blue Remote branches / GitHub

Compiling

Compile the program using gcc:

gcc -o uncommitted uncommitted.c -Wall

Installation

Recommended: /usr/local/bin (system-wide)

Copy the compiled binary to /usr/local/bin so it's available in your PATH:

sudo cp uncommitted /usr/local/bin/

Alternative: ~/bin (user-only)

If you prefer not to use sudo, create a personal bin directory:

mkdir -p ~/bin
cp uncommitted ~/bin/

Then add this line to your ~/.zshrc (or ~/.bashrc if using bash):

export PATH="$HOME/bin:$PATH"

Reload your shell configuration:

source ~/.zshrc

Usage

# Scan from current directory
uncommitted

# Scan from a specific directory
uncommitted /path/to/directory

Example Output

The tool displays:

  1. A header banner
  2. Each repository with uncommitted changes showing:
    • Repository path
    • Current branch and remote tracking branch
    • Remote status: GitHub (pushed), GitHub (not pushed), Remote configured (pushed/not pushed), or No remote configured
    • Ahead/behind commit counts
    • Summary of changes (staged, modified, untracked counts)
    • List of changed files with their status
  3. A summary footer with totals across all repositories

Requirements

  • macOS or Linux
  • gcc compiler
  • git (installed and available in PATH)

License

MIT