| Crates.io | bragit |
| lib.rs | bragit |
| version | 0.1.0 |
| created_at | 2025-10-31 16:15:43.36108+00 |
| updated_at | 2025-10-31 16:15:43.36108+00 |
| description | Commit specific files directly to target branches without switching. |
| homepage | https://github.com/mya-ai/bragit |
| repository | https://github.com/mya-ai/bragit |
| max_upload_size | |
| id | 1910272 |
| size | 38,740 |
bragit is a Rust CLI tool that lets you commit specific files directly to target branches without switching branches.
This tool is built on top of libragit2 via the git2 crate, providing a fast and native way to automate cross-branch commits in Git repositories.
origin/<branch> with --track-remote--push support (delegates to git push for normal authentication)Install directly from crates.io:
cargo install bragit
Or build from source:
git clone https://github.com/mya-ai/bragit.git
cd bragit
cargo build --release
cp target/release/bragit ~/.local/bin/
bragit commit --branch feature/ui src/ui.rs
bragit commit --branch hotfix/login src/login.rs -m "Fix login redirect"
bragit commit --branch release/1.2.3 dist/app.js --push
If the branch doesn’t exist locally, use --track-remote to seed it from origin/BRANCH:
bragit commit --branch feature/experimental new/feature.rs --track-remote
bragit commit \
--branch <BRANCH> \
[--message <MSG>] \
[--push] \
[--track-remote] \
[--repo <PATH>] \
<FILE>
| Flag | Description |
|---|---|
--branch |
Target branch to commit to |
--message, -m |
Custom commit message (default: Update <file>) |
--push |
Push the branch to origin after committing |
--track-remote |
Create local branch from remote if missing |
--repo |
Optional path to Git repo (auto-detects by default) |
git push to sync the branch to origin.All without switching branches or touching your working index.
pre-commit) — since it bypasses normal checkout.# Commit fileA to branchA
bragit commit --branch branchA fileA.txt -m "Update A"
# Commit fileB to branchB
bragit commit --branch branchB fileB.txt -m "Update B"
# Push both
bragit commit --branch branchA fileA.txt --push
bragit commit --branch branchB fileB.txt --push
bragit commit --map "a.txt:branchA" "b.txt:branchB"MIT © 2025 Andy Bell
Pull requests are welcome! If you’d like to add features or improve UX, fork the repo and submit a PR.
git clone https://github.com/mya-ai/bragit.git
cd bragit
cargo run -- commit --branch test examples/demo.txt