fast-git (fg)
A fast and efficient Git/GitHub CLI wrapper with custom aliases support.
Features
- 🚀 Streamlined Git commands - Simplified interface for common Git operations
- 🔄 Dual mode support - Switch between
gitandgh(GitHub CLI) seamlessly - 🎯 Custom aliases - Create and manage your own command aliases
- ⚙️ Persistent configuration - Settings stored in your config directory
- 📦 Zero external dependencies - Lightweight and fast
Installation
Install via cargo:
Or build from source:
The binary will be available as fast-git.
Quick Start
# Initialize a repository
# Add files
# Commit changes
# Add remote origin
# Push to origin
Configuration
Set Mode
Switch between git and GitHub CLI (gh):
# Use git (default)
# Use GitHub CLI
# Check current mode
Commands
Git Operations
| Command | Description | Example |
|---|---|---|
--init |
Initialize a Git repository | fast-git --init |
--add [path] |
Add files to staging (default: .) |
fast-git --add src/ |
--commit <message> |
Commit changes | fast-git --commit "Fix bug" |
--pull [remote] |
Pull from remote (default: origin) |
fast-git --pull |
--push [remote] |
Push to remote (default: origin) |
fast-git --push origin |
--setBranch <name> |
Create and checkout a new branch | fast-git --setBranch feature |
--new <name> |
Create a new branch | fast-git --new develop |
--ro <url> |
Add remote origin | fast-git --ro https://github.com/user/repo.git |
--info [path] |
Show repository status (default: .) |
fast-git --info |
Aliases
Create custom command sequences:
# Create an alias
# List all aliases
# Run an alias
Help
Usage Examples
Basic Workflow
# Initialize and configure repository
# Make changes and commit
Branch Management
# Create a new feature branch
# Make changes
# Push the new branch
Using Aliases
# Create a sync alias
# Use it anytime
GitHub CLI Mode
# Switch to GitHub CLI
# Now all commands use gh instead of git
Configuration Files
Configuration is stored in your system's config directory:
- Linux/macOS:
~/.config/fg/ - Windows:
%APPDATA%\fg\
Files:
config.json- Mode configurationaliases.json- Custom aliases
Library Usage
fast-git can also be used as a library in your Rust projects:
[]
= "0.1.0"
use *;
Requirements
- Rust 1.56 or later
- Git installed on your system
- (Optional) GitHub CLI (
gh) forghmode
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
VMASPAD