A lightweight Rust-based CLI to streamline everyday Git workflows with enhanced safety and user experience. Automatically detects repository context, provides clear status, and guides you through the commit and sync process with intuitive prompts.
- 🛡️ Safer Push Workflow: Added explicit confirmation before pushing changes
- 🔄 Improved Sync: Better handling of remote changes with clear prompts
- 🌍 Fully Internationalized: All user-facing messages now in English
- 🎯 More Precise: Better detection of repository state and changes
- 🛠️ Bug Fixes: Various stability improvements and edge case handling
- 🔍 Auto-detects the repository root (
.git) - 🧭 Context-aware: Shows repository root and current subpath
- 📊 Clear status overview with color-coded output
- 📂 Subpath-aware operations for precise changes
- ⏯️ Interactive workflow with clear prompts at each step
- 🔄 Smart sync that handles both push and pull scenarios
- 🔒 Secure credential handling with GitHub token support
- 🌐 Offline-friendly with clear status indicators
- 🧭 Works from any subdirectory within a repository
All path-sensitive git operations use git -C <repo_root> for robust behavior regardless of where you run syncgit.
- Rust (latest stable version recommended)
- Git 2.0 or later
cargo install syncgitgit clone https://github.com/rickypcyt/syncgit-rustcli.git
cd syncgit
cargo install --path .To work with private repositories, set your GitHub token:
export GITHUB_TOKEN=your_github_token_here
# Add to your shell's rc file to make it persistentRun the tool from any directory within a Git repository:
syncgitThe tool will guide you through:
- Reviewing changes
- Staging files
- Committing with a message
- Syncing with remote (if needed)
- Info header:
Repository rootandSubpath. - Global short status.
- Check pending pushes; optionally push first.
- Pull changes.
- Local changes check; show subpath-only grouped status.
- Stage only current subpath (idempotent if already staged).
- Pause: press Enter → ask for commit message.
- Commit and push.
When you’re in a parent folder with multiple projects, the subpath status is grouped by top-level folder. This keeps large changes readable and helps you focus on a particular folder’s changes when committing from the parent.
If no internet connection is detected, changes are committed locally but not pushed. A message will inform you to push manually once online.
To push to private GitHub repositories via HTTPS, the tool will use the GITHUB_TOKEN environment variable (if available) to authenticate securely by rewriting the remote URL temporarily.
- Update this CLI:
cargo install syncgit --force- Or manage binaries with cargo-update:
cargo install cargo-update
cargo install-update -aterm_size: For responsive terminal layout.- Standard Rust
std::process,std::io,std::env, andstd::net.
- 0.1.6
- Grouped subpath status printing for cleaner views in parent folders with many projects.
- Staging limited to current subpath; consistent
git -C <root>usage. - “Press Enter to commit changes…” pause before commit message.
- Header simplified:
Repository root+Subpath. - Various UX improvements and clearer outputs.
Pull requests and feedback are welcome! Please open an issue first to discuss any major changes.
Made with ❤️ in Rust.