Skip to content

Commit 6f90ea7

Browse files
committed
docs: Also prohibit --amend on stack branches
1 parent 02f2007 commit 6f90ea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.cursor/rules/pr.mdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,4 @@ git push
259259

260260
Prefer merge over rebase — it preserves commit history, doesn't invalidate existing review comments, and avoids the need for force-pushing. Only rebase if explicitly requested.
261261

262-
**Never force-push stack branches.** Do not use `--force`, `--force-with-lease`, or `git push` after `git commit --amend` on branches that are part of a stack. Force-pushing a stack branch can cause GitHub to auto-merge or auto-close other PRs in the stack. If a commit needs fixing, add a new commit instead of amending.
262+
**Never amend or force-push stack branches.** Do not use `git commit --amend`, `--force`, or `--force-with-lease` on branches that are part of a stack. Amending a pushed commit requires a force-push, which can cause GitHub to auto-merge or auto-close other PRs in the stack. If a commit needs fixing, add a new fixup commit instead.

0 commit comments

Comments
 (0)