# git-send
[](https://crates.io/crates/git-send)
[](https://crates.io/crates/git-send)
[](https://crates.io/crates/git-send)
Stage, commit, pull (with rebase), and push your repository with one command.
## Installation
```sh
cargo install git-send
```
Or build from source:
```sh
git clone https://git.sr.ht/~anhkhoakz/git-send
cd git-send
cargo build --release
sudo install -m 755 target/release/git-send /usr/local/bin/git-send
```
## Usage
```sh
git-send [OPTIONS]
```
### Options
- `-m, --message <MSG>` - Commit message (default: "update: automated commit")
- `--msg <MSG>` - Alias for `--message`
- `--dry-run` - Show what would be executed without running it
- `--no-pull` - Skip `git pull --rebase`
- `--no-push` - Skip `git push`
- `--auto-stash` - Stash changes before pulling and restore after
### Examples
```sh
# Basic usage
git-send
# With custom message
git-send --message "fix: update dependencies"
# Preview what would happen
git-send --dry-run
# Skip pull
git-send --no-pull
# Auto-stash before pull
git-send --auto-stash
```
## How it works
1. Stages all changes with `git add -A`
2. Commits with the provided message (or default) if there are staged changes
3. Optionally stashes changes if `--auto-stash` is enabled
4. Pulls from `origin/<branch>` with rebase (unless `--no-pull`)
5. Pushes to `origin/<branch>` (unless `--no-push`)
6. Restores stash if it was created
## License
MIT OR Apache-2.0