Skip to content

Conversation

@bpmct
Copy link
Member

@bpmct bpmct commented Dec 10, 2025

When working on PRs, Claude Code was sometimes force pushing to branches. This adds simple git workflow guidelines that emphasize proper branch checkout and avoiding force pushes.

Changes

Added git workflow section to CLAUDE.md, AGENTS.md, and .claude/docs/WORKFLOWS.md with:

  • Instructions to fetch, checkout, and pull before working on PR branches
  • Note to avoid git push --force unless explicitly requested

Examples of force push behavior

Observed in recent PRs:

The guidelines now make it clear to check out branches properly and push normally.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

When working on PRs, Claude Code was sometimes force pushing to branches.
This adds simple git workflow guidelines emphasizing:
- Check out PR branches properly (fetch, checkout, pull)
- Don't use git push --force unless explicitly requested

Examples of PRs with multiple commits from iterative work:
- #21148: 7 commits including merge commit
- #21150: 9 commits with iterative documentation changes
- #21182: 4 commits with fixes
- Also observed force updates on feat/add-tasks-template-flag branch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@bpmct bpmct marked this pull request as ready for review December 10, 2025 18:04
@bpmct bpmct requested review from ThomasK33 and matifali December 10, 2025 18:04
@bpmct bpmct merged commit 6005608 into main Dec 11, 2025
33 checks passed
@bpmct bpmct deleted the docs/git-workflow-guidelines branch December 11, 2025 13:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants