8 releases
| new 0.2.6 | Mar 2, 2026 |
|---|---|
| 0.2.5 | Mar 2, 2026 |
| 0.2.3 | Aug 11, 2025 |
| 0.2.2 | Jul 27, 2025 |
| 0.1.0 | Jul 14, 2025 |
#2270 in Command line utilities
160KB
3.5K
SLoC
xgit
An enhanced Git tool built with Rust that provides AI-powered commit messages, interactive branch management, and GitHub PR integration.
Features
- 🤖 AI-powered commit messages - Generate conventional commit messages using AI
- 🌿 Interactive branch management - Easy branch switching with a visual picker
- 📊 Branch statistics with GitHub PR tracking - View branch status, merge state, and associated GitHub PRs
- 🗑️ Smart branch pruning - Clean up merged branches with safety checks and interactive selection
- 🔗 GitHub integration - Automatically detect and display pull request information
- 🚀 Git passthrough - Works seamlessly with existing git workflows
Installation
cargo install xgit
Updating
To update to the latest version:
cargo install xgit --force
Note: The --force flag is required to overwrite the existing installation.
Usage
Interactive Branch Switching
Select and switch between branches interactively:
xgit branch
# or use the short alias:
xgit b
Branch Statistics & GitHub PR Tracking
View comprehensive branch information including GitHub PR status:
xgit branch --stats
# or use the short alias:
xgit b --stats
Smart Branch Pruning
Clean up branches that have been merged to main:
# Preview what would be deleted (recommended first)
xgit branch --prune-merged --dry-run
# or use the short alias:
xgit b --prune-merged --dry-run
# Interactive deletion - select which branches to remove
xgit branch --prune-merged
# or use the short alias:
xgit b --prune-merged
AI-Powered Commits
Generate commit messages automatically using AI:
# Stage your changes first
git add .
# Use AI to generate commit message
xgit commit
# or use the short alias:
xgit c
Git Passthrough
Use any git command through xgit:
xgit status
xgit log
xgit push
# ... any git command
GitHub Integration
xgit automatically detects GitHub repositories and fetches PR information for each branch. Authentication options:
- Environment variable: Set
GITHUB_TOKEN - Unauthenticated: Works with public repos (rate limited)
Development
-
Clone the repository:
git clone https://github.com/LiXuanqi/gitx cd xgit -
Install git hooks (recommended):
./scripts/install-hooks.sh -
Build and test:
cargo build cargo test cargo clippy --all-targets -- -D warnings
Publish GitHub Release
-
Create and push a version tag:
git tag v0.2.5 git push origin v0.2.5 -
Create the GitHub release:
gh release create v0.2.5 --title "v0.2.5" --notes "Release notes here"Or auto-generate notes:
gh release create v0.2.5 --generate-notes
Dependencies
~27–45MB
~642K SLoC