devops/release/git-workflow/SKILL.md
Implement Git branching strategies, PR workflows, and release management patterns. Configure GitFlow, trunk-based development, or GitHub Flow for team collaboration. Use when establishing version control workflows or improving development team collaboration.
npx skillsauth add bagelhole/devops-security-agent-skills git-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Implement effective branching strategies and pull request workflows for team collaboration.
Use this skill when:
Best for: Continuous deployment, small teams, mature CI/CD
main ─────●─────●─────●─────●─────●─────●─────●
│ │ │ │ │ │
└─● └─● └─● └─● └─● └─●
feature branches (short-lived)
# Create short-lived feature branch
git checkout main
git pull origin main
git checkout -b feature/add-login
# Work and commit frequently
git add .
git commit -m "feat: add login form"
# Keep branch updated
git fetch origin
git rebase origin/main
# Merge quickly (same day ideally)
git checkout main
git pull origin main
git merge feature/add-login
git push origin main
git branch -d feature/add-login
Best for: Continuous delivery, web applications
main ─────●─────●───────────●─────────────●─────●
│ ↑ ↑ ↑
└───●───●───┘ │ │
feature/login │ │
│ │
└───●───●───●───●───────┘ │
feature/dashboard │
│
└───●─────────────────────────┘
hotfix/security-patch
# Create feature branch from main
git checkout main
git pull origin main
git checkout -b feature/user-dashboard
# Push and create PR
git push -u origin feature/user-dashboard
# After review, merge via PR (squash recommended)
# Delete branch after merge
Best for: Scheduled releases, versioned products
main ────────●────────────────●──────────────●
↑ ↑ ↑
release ────────┼────●───●──────┼──────────────┼
│ │ │ │ │
develop ───●────●────┼───●──●───●───●───●───●──┼
│ │ │ │ │ │
feature ───┴─────────┘ │ │ │ │
│ │ │ │
hotfix ────────────────────┴───────┼───┼──────┘
│ │
feature ────────────────────────────┴───┘
# Initialize GitFlow
git flow init
# Start feature
git flow feature start user-auth
# Finish feature (merges to develop)
git flow feature finish user-auth
# Start release
git flow release start 1.0.0
# Finish release (merges to main and develop)
git flow release finish 1.0.0
# Hotfix
git flow hotfix start security-fix
git flow hotfix finish security-fix
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringtest: Adding testschore: MaintenanceExamples:
git commit -m "feat(auth): add OAuth2 login support"
git commit -m "fix(api): handle null response from payment service"
git commit -m "docs: update API documentation for v2 endpoints"
git commit -m "refactor(db): optimize user query performance"
# Breaking change
git commit -m "feat(api)!: change response format for user endpoint
BREAKING CHANGE: The user endpoint now returns an object instead of array"
# Create template file ~/.gitmessage
# Subject line (50 chars max)
# Body (72 chars per line max)
# - What changed
# - Why it changed
# - Any side effects
# Footer
# Fixes #123
# Co-authored-by: Name <email>
# Configure Git to use template
git config --global commit.template ~/.gitmessage
<!-- .github/pull_request_template.md -->
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Manual testing performed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review performed
- [ ] Documentation updated
- [ ] No new warnings introduced
## Related Issues
Closes #
## Screenshots (if applicable)
# GitHub branch protection
branch_protection:
branch: main
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_status_checks:
strict: true
contexts:
- "ci/tests"
- "ci/lint"
restrictions:
users: []
teams: ["maintainers"]
enforce_admins: true
required_linear_history: true
allow_force_pushes: false
allow_deletions: false
# .github/CODEOWNERS
# Default owners
* @team-leads
# Frontend code
/src/frontend/ @frontend-team
*.tsx @frontend-team
*.css @frontend-team
# Backend code
/src/api/ @backend-team
/src/services/ @backend-team
# Infrastructure
/terraform/ @platform-team
/k8s/ @platform-team
Dockerfile @platform-team
# Documentation
/docs/ @tech-writers
*.md @tech-writers
#!/bin/sh
# .git/hooks/pre-commit
# Run linting
npm run lint
if [ $? -ne 0 ]; then
echo "Linting failed. Fix errors before committing."
exit 1
fi
# Run tests
npm run test:unit
if [ $? -ne 0 ]; then
echo "Tests failed. Fix tests before committing."
exit 1
fi
# Check for debug statements
if grep -r "console.log\|debugger\|binding.pry" --include="*.js" --include="*.ts" --include="*.rb" src/; then
echo "Remove debug statements before committing."
exit 1
fi
// package.json
{
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{js,ts,tsx}": ["eslint --fix", "prettier --write"],
"*.{css,scss}": ["prettier --write"]
}
}
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'chore', 'revert']
],
'subject-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 100]
}
};
# Create annotated tag
git tag -a v1.0.0 -m "Release version 1.0.0"
# Push tag
git push origin v1.0.0
# Create release from tag (GitHub CLI)
gh release create v1.0.0 \
--title "Release 1.0.0" \
--notes "Release notes here" \
--target main
# Using conventional-changelog
npx conventional-changelog -p angular -i CHANGELOG.md -s
# Using git-cliff
git cliff -o CHANGELOG.md
# Rebase (clean history)
git checkout feature/my-feature
git rebase main
git push --force-with-lease
# Merge (preserve history)
git checkout main
git merge feature/my-feature
# Squash merge (single commit)
git merge --squash feature/my-feature
git commit -m "feat: add feature X"
# Apply specific commit to current branch
git cherry-pick abc123
# Cherry pick range
git cherry-pick abc123..def456
# Cherry pick without committing
git cherry-pick -n abc123
# Clean up last 3 commits
git rebase -i HEAD~3
# In editor:
# pick abc123 First commit
# squash def456 Second commit
# reword ghi789 Third commit
Problem: Conflicts when merging branches Solution: Rebase frequently, communicate with team, use smaller PRs
Problem: Local branch far behind remote
Solution: git pull --rebase or git fetch && git rebase origin/main
Problem: Committed to main instead of feature
Solution: git reset HEAD~1, checkout correct branch, recommit
development
Design and operationalize SRE dashboards that surface reliability, latency, error, saturation, and capacity signals across services. Use when building observability views for SLOs, incident response, and executive reliability reporting.
testing
Harden OpenClaw self-hosted environments with baseline host controls, auth tightening, secret handling, network segmentation, and safe update/rollback workflows. Use when deploying OpenClaw in home labs, startups, or production-like local AI infrastructure.
devops
Deploy, manage, and optimize vector databases for AI applications. Covers Qdrant, Weaviate, pgvector, and Pinecone — collection management, indexing strategies, backup, and performance tuning for production RAG and semantic search workloads.
testing
Deploy ML models on Kubernetes with KServe (formerly KFServing) and NVIDIA Triton Inference Server. Includes canary deployments, autoscaling, model versioning, A/B testing, and GPU resource management for production model serving.