| Crates.io | gitfleet |
| lib.rs | gitfleet |
| version | 0.1.0 |
| created_at | 2025-11-06 13:44:48.039308+00 |
| updated_at | 2025-11-06 13:44:48.039308+00 |
| description | A Git submodule manager for synchronized superbranches |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1919692 |
| size | 138,041 |
A command-line tool for executing Git operations across multiple submodules simultaneously.
SuperGit executes Git commands (checkout, pull, push, commit, etc.) across all submodules in a repository at once, maintaining consistent branch states. It reads submodule configuration from .gitmodules and provides a single interface for bulk operations.
.gitmodulesgit clone https://github.com/yourusername/gitfleet.git
cd gitfleet
cargo build --release
sudo cp target/release/gitfleet /usr/local/bin/
gitfleet --version
gitfleet init
gitfleet status
gitfleet create feature-x
This creates the feature-x branch in all submodules and checks it out.
# Make your changes in various submodules
gitfleet commit -m "Implement feature X"
gitfleet push
gitfleet statusShows the status of all submodules in a unified view.
gitfleet status
Output:
gitfleet checkout <branch>Checkout the same branch across all submodules.
gitfleet checkout main
gitfleet checkout -c feature-new # Create and checkout new branch
Options:
-c, --create: Create the branch if it doesn't existFeatures:
gitfleet create <branch>Create a new branch across all submodules.
gitfleet create feature-auth
gitfleet create feature-auth --from main --push
Options:
-f, --from <branch>: Base branch to create from-p, --push: Push the new branch immediately after creationFeatures:
.gitmodules branch fieldsgitfleet pullPull latest changes for the current branch in all submodules.
gitfleet pull
gitfleet pull --rebase
Options:
-r, --rebase: Use rebase instead of mergeFeatures:
gitfleet pushPush current branch for all submodules.
gitfleet push
gitfleet push --force-with-lease
Options:
-f, --force-with-lease: Force push with lease (safer than force)Features:
gitfleet commitCommit changes across all submodules with the same message.
gitfleet commit -m "Fix authentication bug"
gitfleet commit -m "Add new feature" --push
Options:
-m, --message <msg>: Commit message (required)-p, --push: Push immediately after committingFeatures:
gitfleet syncSynchronize all submodules based on .gitmodules branch declarations.
gitfleet sync
gitfleet sync --init --recursive
Options:
-i, --init: Initialize missing submodules-r, --recursive: Recursively sync nested submodulesFeatures:
.gitmodulesgitfleet delete <branch>Delete a branch from all submodules.
gitfleet delete old-feature
gitfleet delete old-feature --remote --force
Options:
-r, --remote: Also delete from remote-f, --force: Force delete (delete even if not fully merged)Features:
gitfleet fetchFetch updates for all submodules.
gitfleet fetch
gitfleet fetch --all
Options:
-a, --all: Fetch from all remotes (not just origin)Features:
gitfleet branchList branches across all submodules.
gitfleet branch
gitfleet branch --all
Options:
-a, --all: Show all branches including remotesFeatures:
gitfleet initInitialize all submodules.
gitfleet init
gitfleet init --recursive
Options:
-r, --recursive: Recursively initialize nested submodulesAll commands support these global options:
-v, --verbose: Enable verbose output-n, --dry-run: Show what would happen without executing-h, --help: Show help information--version: Show version information# Clone your superproject
git clone https://github.com/your/project.git
cd project
# Initialize and sync all submodules
gitfleet init
gitfleet sync
# Create feature branch across all submodules
gitfleet create feature-new-ui --from main
# Check status
gitfleet status
# Make your changes...
# Commit and push
gitfleet commit -m "Add new UI components" --push
# Start of day: sync with team
gitfleet pull
# Check what changed
gitfleet status
# Switch to feature branch
gitfleet checkout feature-analytics
# Make changes, commit frequently
gitfleet commit -m "WIP: analytics dashboard"
# End of day: push your work
gitfleet push
# Update .gitmodules to specify branches
# [submodule "pdfczar"]
# path = pdfczar
# url = https://github.com/user/pdfczar.git
# branch = dev
# Sync all submodules to their declared branches
gitfleet sync --init
# Fetch latest from all remotes
gitfleet fetch
# Check out review branch
gitfleet checkout review/pr-123
# Review, make changes if needed
gitfleet commit -m "Address review comments"
# Push changes
gitfleet push
SuperGit uses the branch field in .gitmodules to determine which branch each submodule should track:
[submodule "api"]
path = api
url = https://github.com/your/api.git
branch = main
[submodule "frontend"]
path = frontend
url = https://github.com/your/frontend.git
branch = develop
Use gitfleet sync to checkout and pull the specified branches.
SuperGit handles many common edge cases gracefully:
--create flagDry-Run Mode: Test operations without making changes
gitfleet checkout feature-x --dry-run
Interactive Prompts: Confirmation for destructive operations
gitfleet delete old-branch --remote
# Prompts: "Are you sure you want to delete 'old-branch' from remote?"
Force Flags Required: Dangerous operations need explicit flags
gitfleet push --force-with-lease
Clear Error Messages: Every error includes suggested fixes
✗ Error: Branch 'feature-x' does not exist in 'api'. Use --create to create it.
Ensure you're running gitfleet from the repository root and that .gitmodules exists.
Commit or stash your changes before switching branches:
git stash # in the submodule
gitfleet checkout other-branch
Ensure your SSH keys or credentials are set up correctly:
ssh -T git@github.com # Test GitHub SSH
Use gitfleet status to see which submodules are on different branches, then:
gitfleet checkout main # Align all to main
MIT
Standard Git submodule commands operate on one submodule at a time. For projects with multiple submodules, this requires repeating operations for each submodule. SuperGit automates this by executing commands across all submodules in a single invocation.