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

FlagRequiredDescription
--repo <path>OptionalTarget exactly one repository instead of discovering recursively.
--forceOptionalPush with --force-with-lease. Cannot be combined with --force-unsafe.
--force-unsafeOptionalPerform a raw --force push after confirmation.
--yesOptionalSkip the raw force-push confirmation prompt.
--guidedOptionalInteractively 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-unsafe rewrites 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-unsafe runs sequentially after the aggregate confirmation.
  • --yes only skips the raw force-push confirmation.
  • Each repository’s remote git push operation has a 30-second timeout.