A command-line tool that helps maintain repository hygiene by checking Git repository status and providing interactive fixes for common issues.
- 🔍 Comprehensive repository status checks:
- Uncommitted changes detection
- Unpushed commits detection
- Branch protection checks
- Update requirements check
- 🤖 Interactive mode with guided fixes
- 🚦 Clear status indicators and colored output
- 🔧 Automatic issue resolution (with confirmation)
- 🤫 Quiet mode for CI/CD pipelines
- Go 1.18 or later
- Git
go install github.com/hassanzouhar/gitstatus@mainMake sure $HOME/go/bin is in your PATH:
export PATH=$PATH:$HOME/go/bingitstatusgitstatus -i-i, --interactive: Enable interactive mode with guided fixes-q, --quiet: Suppress output except for errors-v, --version: Display version information-h, --help: Show help information
$ gitstatus
Current branch: main
⚠ You have uncommitted changes$ gitstatus -i
Current branch: main
⚠ You have uncommitted changes
=== Recommended Actions ===
1. Commit your changes:
git add .
git commit -m "your commit message"
Would you like to commit all changes? (y/n): y
Enter commit message: update readme
✓ Changes committed successfully
⚠ You have unpushed commits
2. Push your commits:
git push origin main
Would you like to push your commits? (y/n): y
✓ Commits pushed successfully
✓ All issues were resolved successfullyIn interactive mode, the tool will:
- Check for uncommitted changes and offer to commit them
- Check for unpushed commits and offer to push them
- Verify branch protection rules
- Check if the branch needs to be updated
Each step is handled sequentially with clear prompts and confirmations.