You'll noticeTier: how much it should matter to you
1Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Bash ToolArea: what it touches
Bug FixesKind: in v2.1.333,
Bug FixesSection of the release
What
When Claude Code is about to run a shell command that force-pushes with git, it shows the warning "Note: may overwrite remote history". A force push replaces history on the shared remote copy of a repository. The pattern that spots these commands was rewritten.
The new pattern accepts either a space or a line break followed by spacing before the force flag. These flags count as force flags:
A command split across lines, with the force flag on the line directly after git push ..., gets the warning. The previous pattern also allowed a line break at that point, so in practice the cases it catches are largely the same as before.
Why
The rewrite makes it explicit that a force flag on a continued line still triggers the warning. You are still warned before history on the remote could be overwritten when a long push command is broken over two lines.
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeSelf-hosted runner: Fixed git fetch and git push in a long-running process failing after a session token refresh; a wrapper must expose the…