git-send
Stage, commit, pull (with rebase), and push your repository with one command.
git-send is a small Rust utility that keeps your workflow consistent by
composing the most common Git plumbing steps into a single, well‑logged
operation.
Highlights
- Stage every tracked and untracked change with
git add -A - Commit with a positional or
-m/--messageflag, falling back to a configurable default message - Pull with
--rebaseand optionally auto-stash dirty worktrees before pulling - Push to
origin/<current-branch>once the history is up to date - Toggle any step (
--dry-run,--no-pull,--no-push) without editing scripts - Colorized output plus
-v/--verboselogging for deeper insight
Getting Started
Prerequisites
- Rust 1.91+ (stable toolchain recommended)
- Cargo (bundled with Rust)
- just (optional) if you prefer the provided recipes
Build from source
Run
# or install the binary and run it directly
Use --dry-run any time you want to confirm what would happen without touching
your repo:
You will see the inferred branch, remote, and the ordered list of Git commands that would execute.
CLI Reference
| Flag | Description |
|---|---|
-m, --message <MSG> |
Commit message (same as positional argument) |
--dry-run |
Log every planned Git command without running it |
--no-pull |
Skip git pull --rebase origin <branch> |
--no-push |
Skip git push origin <branch> |
-v, --verbose |
Enable verbose logging via env_logger |
--config <PATH> |
Use a custom config file instead of the default |
-h/--help and -V/--version are provided automatically by Clap.
Configuration
git-send merges settings from (1) a config file, (2) environment variables,
and (3) CLI flags. Later sources win.
Config file
By default the tool looks for ~/.config/git-send/config. Supply
--config /path/to/file to override. Example:
# git-send configuration file
# Boolean values: 1/true/yes/on or 0/false/no/off
default_msg=Update: automated commit
dry_run=false
no_pull=false
no_push=false
auto_stash=true
verbose=false
Environment variables
| Variable | Meaning |
|---|---|
GIT_SEND_DEFAULT_MSG |
Overrides the fallback commit message |
GIT_SEND_DRY_RUN |
"1" / "true" to enable dry runs |
GIT_SEND_NO_PULL |
Skip pulls regardless of config |
GIT_SEND_NO_PUSH |
Skip pushes regardless of config |
Use the config file to turn on auto_stash if you often have local
modifications that should be stashed before a pull. When enabled, git-send
will stash before pulling and restore the stash afterward (even if the pull
fails).
Exit codes & errors
- Exits
0when every requested Git operation succeeds - Exits
1if a configuration, Git command, or validation step fails (for example: empty commit message, not a Git repo, failed pull/push)
Logs and user-facing messages are colorized via colored and env_logger for
easy scanning. Use --verbose when you need to inspect the underlying Git calls
and their stdout/stderr.
Contributing
Bug reports and pull requests are welcome. Please open an issue first if you
would like to propose a sizable change. Make sure that cargo fmt,
cargo clippy, and the existing tests (cargo test) pass before submitting.
License
Distributed under the MIT or Apache-2.0 . See LICENSE and LICENSE-APACHE for details.