Skip to content

Comments

Add feature branch workflow policy#33

Merged
dweekly merged 1 commit intomainfrom
feature/add-branch-protection-policy
Nov 16, 2025
Merged

Add feature branch workflow policy#33
dweekly merged 1 commit intomainfrom
feature/add-branch-protection-policy

Conversation

@dweekly
Copy link
Owner

@dweekly dweekly commented Nov 16, 2025

Summary

Enforce feature branch workflow to prevent accidental commits to main.

Changes

  • CLAUDE.md: Add critical rule requiring all changes on feature branches
  • Documentation: Include step-by-step workflow examples
  • Git Hook: Add pre-commit hook to prevent commits to main branch

Pre-Commit Hook

The hook blocks commits to main with a helpful error message:

❌ ERROR: You cannot commit directly to the main branch!

Please use a feature branch instead:
  git checkout -b feature/your-feature-name

Workflow

# Start new feature
git checkout main && git pull
git checkout -b feature/descriptive-name

# Make commits
git add . && git commit -m "message"

# Push and create PR
git push -u origin feature/descriptive-name
gh pr create --title "..." --body "..."

Benefits

  • Prevents accidental commits to main
  • Enforces code review through PRs
  • Maintains clean main branch history
  • Easier to track and revert changes

🤖 Generated with Claude Code

CRITICAL: All changes must now be made on feature branches.
Direct commits to main are prohibited.

Changes:
- Add feature branch workflow to CLAUDE.md
- Include step-by-step workflow examples
- Document PR creation process
- Add pre-commit git hook to prevent main commits

The pre-commit hook will block commits to main with a helpful
error message guiding developers to use feature branches.

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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link

🎸 Sinister Dexter Preview Deployment

This build: https://e73bfd04.sinister-dexter.pages.dev
🔄 Latest on PR: https://preview-33.sinister-dexter.pages.dev/

Commit: 02ac644

The first link shows this exact build, while the second always shows the latest changes on this PR.

@dweekly dweekly merged commit 8b15dcc into main Nov 16, 2025
1 check passed
@dweekly dweekly deleted the feature/add-branch-protection-policy branch November 16, 2025 01:17
@github-actions
Copy link

✅ FTP Deployment Successful!

PR #33: Add feature branch workflow policy
Merged by: @dweekly
Commit: 8b15dcc

Deployment Details

  • Server: server298.com
  • Directory: /www/www-2025/
  • Time: Sun, 16 Nov 2025 01:17:30 GMT

🌐 Live Site: https://sinisterdexter.net/

All tests passed and the site has been successfully deployed to production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant