| Crates.io | git-x |
| lib.rs | git-x |
| version | 1.1.0 |
| created_at | 2025-07-26 22:01:52.434702+00 |
| updated_at | 2025-08-03 06:39:07.808982+00 |
| description | CLI extensions for Git that simplify common workflows |
| homepage | https://github.com/simeg/git-x |
| repository | https://github.com/simeg/git-x |
| max_upload_size | |
| id | 1769502 |
| size | 369,727 |
git-x is a collection of smarter, faster, and more intuitive Git subcommands built to make your daily workflow suck less.
It wraps common Git actions in muscle-memory-friendly, no-brainer commands β perfect for solo developers, team leads, and anyone tired of typing git log --oneline --graph --decorate --all for the 400th time.

info - High-level repository overviewhealth - Repository health checksummary - Commit summary and statscontributors - Contributor statisticstechnical-debt - Code complexity analysislarge-files - Find largest filesnew - Create and switch to new branchrename-branch - Rename current branchswitch-recent - Interactive branch pickerclean-branches - Delete all merged branchesprune-branches - Delete branches merged into currentupstream - Manage upstream relationshipsgraph - Pretty commit graphcolor-graph - Colorized commit graphsince [ref] - Show commits since referencewhat [branch] - Compare branchesstash-branch - Advanced stash operationssync - Sync with upstreamgit-x Just Worksβ’Git is powerful, but its UX is stuck in the early 2000s.
You're probably asking:
Most Git tools either:
git-x fixes that by giving you opinionated, purpose-built subcommands that just do the thing.
π‘ Want to see git-x in action? Check out our Real-World Scenarios document to see exactly how git-x commands solve everyday developer problems like code review cleanup, branch naming mistakes, urgent context switching, and complex remote workflows.
cargo install git-x
Or clone and run manually:
git clone https://github.com/simeg/git-x
cd git-x
cargo install --path .
git-x supports tab completion for all shells.
Install completion files to standard directories:
# Install for your shell
git x completion-install bash
git x completion-install zsh
git x completion-install fish
This will:
Follow the printed instructions after installation to enable completions in your shell configuration.
If tab completion doesn't work immediately, you may need to:
# For zsh - clear completion cache
rm ~/.zcompdump*
# For bash - refresh command hash
hash -r
# For fish - clear completion cache
fish -c "complete --erase"
# Then restart your shell
infoShow a high-level overview of the current repo
π Git commands
git x info
ποΈ Repository: git-x
π Current branch: master
π Upstream: origin/master
β
Status: Up to date
β οΈ Working directory: Has changes
π Staged files: None
β No open PR for current branch
π vs main: 2 ahead, 1 behind
π Recent activity:
* a1b2c3d Add new feature (2 hours ago) <Alice>
* d4e5f6g Fix bug in parser (4 hours ago) <Bob>
* g7h8i9j Update documentation (1 day ago) <Charlie>
gh CLI)healthCheck repository health and identify potential issues
π Git commands
git x health
π₯ Repository Health Check
==============================
β [00:00:01] [########################################] 8/8 Health check complete!
β
Git configuration: OK
β
Remotes: OK
β
Branches: OK
β
Working directory: Clean
β
Repository size: OK
β οΈ Security: Potential issues found
β
.gitignore: Looks good
β
Binary files: OK
π§ Found 3 issue(s):
π 2 potentially sensitive commit message(s) found:
β’ a1b2c3d Add API key configuration
β’ d4e5f6g Update secret token handling
π 1 potentially sensitive file(s) in repository:
β’ config/private.key
β οΈ 2 environment file(s) found - ensure no secrets are committed:
β’ .env.local
β’ .env.production
Useful for:
summaryShow a short, changelog-style summary of recent commits
π Git commands
git x summary
git x summary --since "2 days ago"
Flags:
--since β Accepts natural date formats like "2 days ago", "last Monday", or exact dates like "2025-07-01". It uses Git's built-in date parser, so most human-readable expressions work.Without --since flag (shows repository summary):
π Repository Summary
==================================================
ποΈ Repository: git-x
π Current branch: master
π Upstream: origin/master (up to date)
π Commits (1 month ago): 72
π Files: 63 total
With --since flag (shows changelog-style commit history):
π
Commit Summary since 2 days ago:
==================================================
π 2025-07-30
- πΉ Big re-architecture (by Simon Egersand, 4 hours ago)
- π Fix remaining test failures (by Alice, 6 hours ago)
π 2025-07-29
- β¨ Add new features (by Bob, 1 day ago)
- π Refactor core components (by Carol, 1 day ago)
--since: Groups commits by day with commit messages, authors, and timestamps--since (e.g. --since "1 week ago")contributorsShow contributor statistics for the repository
π Git commands
git x contributors
π Repository Contributors (15 total commits):
π₯ Alice Smith 10 commits (66.7%)
π§ alice@example.com | π
2025-01-01 to 2025-01-20
π₯ Bob Jones 3 commits (20.0%)
π§ bob@example.com | π
2025-01-05 to 2025-01-15
π₯ Charlie Brown 2 commits (13.3%)
π§ charlie@example.com | π
2025-01-10 to 2025-01-12
Shows repository contributors ranked by commit count with email addresses and date ranges of their contributions.
technical-debtAnalyze code complexity and technical debt metrics
π Git commands
git x technical-debt
π Technical Debt Analysis
π Large Commits (>20 files changed)
β No large commits found
π₯ File Hotspots (frequently modified)
1. 15 changes | HIGH | src/main.rs
2. 8 changes | MED | src/lib.rs
3. 6 changes | LOW | README.md
πΏ Long-lived Branches (>30 days)
β’ feature/old-refactor | 3 months ago | Alice Smith
β’ hotfix/legacy-fix | 6 weeks ago | Bob Jones
π Code Churn (high add/delete ratio)
1. +245 -189 | HIGH | src/parser.rs
2. +156 -98 | MED | src/utils.rs
π¦ Binary Files in Repository
! 3 binary files found
β’ assets/logo.png
β’ docs/manual.pdf
...
Analysis complete!
Analyzes repository for technical debt indicators including large commits, file modification hotspots, long-lived branches, code churn patterns, and binary file usage.
large-filesFind largest files in repository history
π Git commands
git x large-files
git x large-files --limit 20 --threshold 5
π Scanning repository for large files...
π Largest files in repository history:
15.2 MB assets/video.mp4
8.7 MB docs/presentation.pdf
3.1 MB images/hero-banner.png
π‘ Found 3 files larger than 1.0 MB
Flags:
--limit <number> β Number of files to show (default: 10)--threshold <MB> β Minimum file size in MB to includeUseful for identifying large files that may be slowing down your repository.
newCreate and switch to a new branch
π Git commands
git x new feature-branch
git x new hotfix --from main
πΏ Creating branch 'feature-branch' from 'current-branch'...
β
Created and switched to branch 'feature-branch'
Flags:
--from <branch> β Base the new branch off a specific branch instead of currentValidates branch names and prevents common Git naming issues.
rename-branchRename the current branch locally and on remote
π Git commands
git x rename-branch new-feature-name
π Renaming branch 'old-name' to 'new-feature-name'...
β
Branch renamed successfully
Safely renames your current branch by:
switch-recentInteractive picker for recent branches
π Git commands
git x switch-recent
? Select a branch to switch to:
π feature/auth-improvement
π hotfix/login-bug
π feature/dark-mode
π main
Shows an interactive menu of your 10 most recently used branches (excluding current branch). Use arrow keys to navigate, Enter to select.
clean-branchesDelete all fully merged local branches (except protected ones)
π Git commands
git x clean-branches
git x clean-branches --dry-run # Preview what would be deleted
β οΈ Are you sure you want to clean merged branches?
This will delete 3 merged branches: feature/refactor, bugfix/signup-typo, hotfix/quick-fix
[y/N]: y
π§Ή Deleted 3 merged branches:
- feature/refactor
- bugfix/signup-typo
- hotfix/quick-fix
Flags:
--dry-run β Show which branches would be deleted without actually deleting themNote: This command will prompt for confirmation before deleting branches to prevent accidental deletions.
prune-branchesDelete branches merged into current branch
π Git commands
Deletes all local branches that have already been merged into the current branch, while skipping protected ones.
Useful for keeping your repo tidy after merging feature branches.
git x prune-branches
git x prune-branches --except "release,v1.0-temp"
git x prune-branches --dry-run # Preview what would be deleted
β οΈ Are you sure you want to prune merged branches?
This will delete 2 merged branches: feature/completed-task, hotfix/old-bug
[y/N]: y
π§Ή Deleted merged branch 'feature/completed-task'
π§Ή Deleted merged branch 'hotfix/old-bug'
Defaults:
main, master, developFlags:
--except <branches> β Comma-separated list of branch names to exclude from deletion--dry-run β Show which branches would be deleted without actually deleting themNote: This command will prompt for confirmation before deleting branches to prevent accidental deletions.
upstreamManage upstream branch relationships
π Git commands
git x upstream status
git x upstream set origin/main
git x upstream sync-all --dry-run
status β Show upstream status for all branches
π Upstream status for all branches:
* main -> origin/main
feature -> (no upstream)
hotfix -> origin/hotfix
set <upstream> β Set upstream for current branch
sync-all β Sync all local branches with their upstreams
--dry-run β Show what would be synced without doing it--merge β Use merge instead of rebaseStreamlines upstream branch management across your entire repository.
graphPretty Git log with branches, remotes, and HEADs
π Git commands
git x graph
* fc27857 (HEAD -> master, origin/master) Make tests more robust
* d109d83 Fix remaining test failures with improved git repository detection
* ded10bb Apply code formatting and linting fixes
| * 71b448a (feature/auth-improvement) Apply code formatting and linting fixes
|/
* 6c69a03 Fix failing tests on GitHub Actions with robust error handling
* 4f6565e Fix tests
* 433788a Update README.md
* 8594ff0 Implement comprehensive layered architecture for code structure reorganization
color-graphColorized Git log with branches, remotes, HEADs, and author info
π Git commands
git x color-graph
Enhanced version of git x graph with:
since [ref]Show commits since a reference (e.g.,
d926b4b, my-branch, origin/main)
π Git commands
git x since origin/main
π Commits since origin/main:
- 8f2d9b3 fix login bug
- b41a71e add auth test
what [branch]Show what's different between this branch and another (default: main)
π Git commands
git x what
git x what --target develop
Branch: feature/new-ui vs main
+ 4 commits ahead
- 2 commits behind
Changes:
- + new_ui.js
- ~ App.tsx
- - old_ui.css
Flags:
--target <branch> β Branch to compare to (default: main)fixupCreate fixup commits for easier interactive rebasing
π Git commands
git x fixup abc123
git x fixup abc123 --rebase
π§ Creating fixup commit for abc123...
β
Fixup commit created for abc123
π‘ To squash the fixup commit, run: git rebase -i --autosquash abc123^
Flags:
--rebase β Automatically start interactive rebase with autosquash after creating fixupCreates a fixup commit that can be automatically squashed during interactive rebase. Requires staged changes.
undoUndo the last commit (without losing changes)
π Git commands
git x undo
Last commit undone (soft reset). Changes kept in working directory.
bisectSimplified bisect workflow
π Git commands
# Start bisect session
git x bisect start <good-commit> <bad-commit>
# Mark current commit as good/bad/untestable
git x bisect good
git x bisect bad
git x bisect skip
# Show bisect status
git x bisect status
# End bisect session
git x bisect reset
# Start bisecting between a known good commit and HEAD
git x bisect start HEAD HEAD~10
# Git checks out a commit for testing
# Test your code, then mark the commit:
git x bisect bad # if bug is present
git x bisect good # if bug is not present
git x bisect skip # if commit is untestable
# Repeat until git finds the first bad commit
git x bisect reset # return to original branch
π Starting bisect between abc123 (good) and def456 (bad)
π Checked out commit: 789abc Fix user authentication
β³ Approximately 3 steps remaining
π‘ Test this commit and run:
git x bisect good if commit is good
git x bisect bad if commit is bad
git x bisect skip if commit is untestable
stash-branchAdvanced stash management with branch integration
π Git commands
git x stash-branch create new-feature
git x stash-branch clean --older-than 7d
git x stash-branch apply-by-branch feature-work
git x stash-branch interactive
git x stash-branch export ./patches
create <branch-name> β Create a new branch from a stash
--stash <ref> β Use specific stash (default: latest)clean β Clean up old stashes
--older-than <time> β Remove stashes older than specified time--dry-run β Show what would be cleaned without doing itclean:π§Ή Cleaning 3 stash(es):
stash@{0}: WIP on feature: Add new component
stash@{1}: On main: Fix typo in README
stash@{2}: WIP on bugfix: Debug auth issue
β οΈ Are you sure you want to clean old stashes?
This will delete 3 stashes: stash@{0}, stash@{1}, stash@{2}
[y/N]: y
β
Cleaned 3 stash(es)
apply-by-branch <branch-name> β Apply stashes from a specific branch
--list β List matching stashes instead of applyinginteractive β Interactive stash management with fuzzy search
export <output-dir> β Export stashes to patch files
--stash <ref> β Export specific stash (default: all stashes).patch files that can be shared or archivedinteractive:π What would you like to do?
β― Apply selected stash
Delete selected stashes
Create branch from stash
Show stash diff
List all stashes
Exit
π― Select stash to apply:
β― stash@{0}: WIP on feature: Add authentication (from feature-auth)
stash@{1}: On main: Fix README typo (from main)
stash@{2}: WIP on bugfix: Debug API calls (from api-fixes)
Helps manage stashes more effectively by associating them with branches and providing modern interactive workflows.
Note: Interactive and destructive commands will prompt for confirmation to prevent accidental data loss.
syncSync current branch with upstream (fetch + rebase/merge)
π Git commands
git x sync
git x sync --merge
π Syncing branch 'feature' with 'origin/feature'...
β¬οΈ Branch is 2 commit(s) behind upstream
β
Successfully rebased onto upstream
Flags:
--merge β Use merge instead of rebase for integrationAutomatically fetches from remote and integrates upstream changes into your current branch.
git-x believes in complete transparency β there's no magic, no hidden behavior, and no surprise side effects.
Every git-x command is a thin wrapper around standard Git operations that you could run yourself. Want to know exactly what's happening under the hood? Check out our Command Internals Documentation.
Why this matters:
git-x workflow with plain GitExample: When you run git x graph, it literally executes:
git log --graph --oneline --all -20
No database calls, no hidden state, no magic β just Git doing Git things, with better UX.
git-x Just Worksβ’Since git-x is installed as a standalone binary, Git automatically recognizes it as a subcommand when you type git x [command].
This is Git's standard extension mechanism β no configuration needed.
How it works:
git x infogit-x in your $PATHgit-x info and displays the outputWhy this rocks:
git-x is a thin, opinionated wrapper around native Git commands.
Philosophy:
git-x command maps to standard Git operationsExample: git x graph literally runs:
git log --graph --oneline --all -20
Why Rust?
git-x is designed with speed and efficiency at its core. Every command has been optimized for performance through parallel execution and smart concurrency.
All major analysis commands leverage:
// Example: Parallel Git operations
let (repo_info, branch_status, working_dir) = tokio::try_join!(
AsyncGitOperations::repo_root(),
AsyncGitOperations::branch_info_parallel(),
AsyncGitOperations::is_working_directory_clean(),
)?;
// Example: Multi-threaded file processing
let large_files: Vec<LargeFile> = files
.par_iter()
.filter_map(|file| analyze_file_size(file))
.collect();
The result? Commands that feel instant, even on large repositories.
git under the hood β no black magicMIT