GitScroll #006

The force-push is powerful. So is the chainsaw.

Rewrite shared history only with awareness, coordination, and protection.

All scrolls

Interpretation

Force-push is not evil; it is a sharp tool whose blast radius depends on branch ownership. On a private branch it can clarify review. On a shared branch it can erase someone else’s work and invalidate references. Know who depends on the history before replacing it.

Practice

  • Use force-with-lease instead of blind force.
  • Protect main and release branches.
  • Coordinate before rewriting a reviewed branch.

Anti-pattern

Force-pushing a shared branch to make its graph look tidy.