Skip to main content
Mythos

A force push is a Git push that overwrites a remote branch's history with the pusher's local history, even when they've diverged, discarding whatever commits existed only on the remote instead of merging them in.

A normal push is rejected if the remote branch has commits the pusher doesn't have locally — Git requires a merge or rebase first, to avoid silently losing anyone's work. A force push (git push --force, or the safer --force-with-lease) bypasses that check and makes the remote branch match the local one exactly, discarding any remote-only commits in the process.

This is destructive by design, which is why shared branches are typically configured, via 📝branch protection, to block force pushes outright: on a branch multiple people or agents push to, a force push from one of them can silently erase another's already-pushed work with no warning to anyone. It's occasionally legitimate on a private, single-owner branch — cleaning up local history before a first push, for instance — but never safe as a routine operation on a branch anyone else relies on.

Contexts

Created with 💜 by One Inc | Copyright 2026