| Crates.io | gitstatus |
| lib.rs | gitstatus |
| version | 1.0.0 |
| created_at | 2024-02-05 10:17:09.219343+00 |
| updated_at | 2025-08-09 15:19:10.286808+00 |
| description | Does one thing incredibly well: tells you your current branch, origin branch and the number of changes. Perfect for large repositories / monorepos |
| homepage | |
| repository | https://github.com/stephenyu/gitstatus |
| max_upload_size | |
| id | 1127451 |
| size | 109,353 |
A fast, modern Rust tool that provides concise git repository status information. Perfect for shell prompts, scripts, and large repositories/monorepos.
gix (Gitoxide)git clone https://github.com/stephenyu/gitstatus.git
cd gitstatus
cargo install --path .
cargo install gitstatus
# In any git repository
gitstatus
# Output: main origin/main β
# With changes
gitstatus
# Output: main origin/main +2~1-1
# Show help
gitstatus --help
# Specify a different repository path
gitstatus --path /path/to/repo
# Show verbose error messages
gitstatus --verbose
The output consists of three parts separated by spaces:
β - Clean working directory+N - N added files~N - N modified files-N - N deleted filesrN - N renamed filestN - N files with type changes# Clean repository on main branch tracking origin/main
$ gitstatus
main origin/main β
# Repository with changes
$ gitstatus
main origin/main +2~3-1
# Detached HEAD state
$ gitstatus
HEAD β
# Branch without upstream
$ gitstatus
feature-branch +1
This version represents a complete modernization of the codebase:
anyhow for context-rich error messagesclap derive macrosgix: Eliminated external git command calls in favor of gix (Gitoxide)gix::status platform and tree_index_status() for precise, fast diffsgit -uno)gix parallel feature to check tracked-file modifications efficientlyprocess::exit(1)~ for modified vs + for added)By default, gitstatus is optimized for shell prompts and large repos:
HEAD^{tree} to the index for staged changes using Repository::tree_index_status().Repository::status(...).into_index_worktree_iter(...) with untracked disabled unless requested.-u no: no untracked scan (no dirwalk)-u normal: collapsed untracked-u all or --all: full untracked listing# Build
cargo build
# Run tests
cargo test
# Run with development features
cargo run -- --verbose
# Check formatting and lints
cargo fmt --check
cargo clippy
GPL-3.0-only
Contributions are welcome! Please feel free to submit a Pull Request.