Tool Parameter Abuse
- Category
- Tool Misuse
- Confidence
- 95% confidence
- Finding
The looped use of 'git push --force-with-lease' across all matching stack branches can rewrite multiple remote branches in one operation. Although '--force-with-lease' is safer than '--force' and appropriate for rebased stacks, this is still a high-risk operation because incorrect branch selection, stale assumptions, or mis-triggering could mass-update remote history and disrupt reviews or collaborators.
- Content
bash for branch in $(git branch --list "${STACK}/*" \ | sed 's/^[* ]*//' | sort); do git push --force-with-lease origin "${branch}" echo "force-pushed: ${branch}" done
