Git Workflows
Git Workflows
Section titled “Git Workflows”PopKit provides unified git commands that automatically gather context and follow best practices.
Commands
Section titled “Commands”Commit
Section titled “Commit”Command: /popkit-dev:git commit
What it does:
- Runs
git statusto see staged changes - Runs
git diffto see modifications - Reviews recent commits for style
- Generates meaningful commit message
- Creates commit with co-author tag
Usage:
# Stage files firstgit add src/auth.js src/routes.js
# Let PopKit create commit/popkit-dev:git commitOutput:
feat: Implement OAuth2 authentication with Google provider
Add OAuth2 flow with Google Sign-In integration:- Create /auth/google/callback route- Add token validation middleware- Store refresh tokens in Redis
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>Command: /popkit-dev:git push
What it does:
- Checks branch protection rules
- Runs pre-push hooks
- Validates tests pass
- Pushes to remote
Usage:
/popkit-dev:git pushPull Request
Section titled “Pull Request”Command: /popkit-dev:git pr
What it does:
- Analyzes all commits in branch
- Examines full diff from base branch
- Generates comprehensive PR summary
- Creates PR with test plan
- Links related issues
Usage:
# Create PR/popkit-dev:git pr
# Create draft PR/popkit-dev:git pr --draftOutput:
## Summary
- Implement OAuth2 authentication with Google provider- Add token refresh mechanism- Create middleware for protected routes
## Test Plan
- [ ] Test Google Sign-In flow- [ ] Verify token refresh works- [ ] Check protected routes block unauthenticated users- [ ] Test logout functionality
🤖 Generated with Claude CodePublish
Section titled “Publish”Command: /popkit-dev:git publish
What it does:
- Checks for sensitive data
- Reviews commit history
- Creates public repository
- Pushes code
- Sets up README and LICENSE
Usage:
/popkit-dev:git publishBranch Protection
Section titled “Branch Protection”PopKit enforces standard Git workflows with branch protection awareness.
Protected Branches
Section titled “Protected Branches”The following branches are protected and require feature branch workflow:
main- Primary integration branchmaster- Legacy primary branchdevelop- Development integration branchproduction- Production release branch
Feature Branch Workflow
Section titled “Feature Branch Workflow”When on a protected branch with uncommitted changes, PopKit will:
- Detect: Check
git branch --show-current - Warn: Show critical priority recommendation
- Guide: Provide feature branch creation commands
Recommended Workflow:
# Create feature branchgit checkout -b feat/your-feature-namegit push -u origin feat/your-feature-name
# Create pull request/popkit-dev:git pr
# Clean up local protected branchgit checkout maingit reset --hard origin/mainBest Practices
Section titled “Best Practices”- Stage Intentionally: Only stage files you want to commit
- Review Diffs: Check what’s being committed
- Descriptive Messages: PopKit generates them, but review
- Use Feature Branches: Never commit directly to main/master
- Create PRs: Use PR workflow for all changes
- Link Issues: Reference issue numbers in PRs
Troubleshooting
Section titled “Troubleshooting”Commit Message Not Generated
Section titled “Commit Message Not Generated”Symptom: Generic commit message
Solution:
- Ensure files are staged (
git add) - Check that there are actual changes (
git diff --staged)
PR Creation Fails
Section titled “PR Creation Fails”Symptom: gh pr create fails
Solution:
- Install GitHub CLI:
brew install ghorchoco install gh - Authenticate:
gh auth login - Ensure branch is pushed:
git push -u origin branch-name
Protected Branch Warning
Section titled “Protected Branch Warning”Symptom: PopKit warns about committing to main
Solution:
- Create feature branch:
git checkout -b feat/my-feature - Push feature branch:
git push -u origin feat/my-feature - Create PR:
/popkit-dev:git pr
Next Steps
Section titled “Next Steps”- Learn about Routines
- Explore Power Mode
- Review Feature Development