push
Pushes local commits to remote for target repositories.
Usage
git-wrangler push [--repo <path>] [--force] [--force-unsafe] [--yes] [--guided]
What it does
Discovers Git worktrees under the current directory, or targets exactly one worktree with --repo, and runs git push origin HEAD. --force uses git push --force-with-lease origin HEAD; --force-unsafe uses raw git push --force origin HEAD only after one confirmation for all targets unless --yes is supplied.
Run git-wrangler review first when you want to inspect the committed changes that will be pushed.
Options
| Flag | Required | Description |
|---|---|---|
--repo <path> | Optional | Target exactly one repository instead of discovering recursively. |
--force | Optional | Push with --force-with-lease. Cannot be combined with --force-unsafe. |
--force-unsafe | Optional | Perform a raw --force push after confirmation. |
--yes | Optional | Skip the raw force-push confirmation prompt. |
--guided | Optional | Interactively configure command options before execution. |
Examples
# Standard push
git-wrangler push
# Lease-safe force push
git-wrangler push --force
# Raw force push after explicit confirmation
git-wrangler push --force-unsafe --yes
# Push changes for a specific repository
git-wrangler push --repo /path/to/repo
Notes
Warning:
--force-unsaferewrites remote branch history without the lease protection used by--force. Only use it after a deliberate history-rewriting operation and when you are certain no remote work will be overwritten.
--force-unsaferuns sequentially after the aggregate confirmation.--yesonly skips the raw force-push confirmation.- Each repository’s remote
git pushoperation has a 30-second timeout.