← Back to list

git-workflow
by rafazsh
⭐ 0🍴 0📅 Dec 29, 2025
SKILL.md
name: git-workflow description: Git workflows for branching, committing, and creating PRs. Use when working with Git operations, creating commits, or opening pull requests.
Git Workflow Skill
When to Use
- Creating new branches
- Writing commit messages
- Creating pull requests
- Resolving merge conflicts
- Managing branch history
Branch Creation
Format
<branch_type>/<branch_name>
Common Branch Types
| Type | Use For |
|---|---|
feature/ | New functionality |
bugfix/ | Bug fixes |
hotfix/ | Critical production fixes |
enhancement/ | Improvements |
docs/ | Documentation |
Process
# 1. Ensure you're on main branch
git checkout master
git pull origin master
# 2. Create feature branch
git checkout -b feature/user-authentication
# 3. Work on changes...
# 4. Push branch
git push -u origin feature/user-authentication
Commit Messages
Format
[OPTIONAL-REFERENCE] Verb subject description
Allowed Verbs
Add- New functionalityFix- Bug fixesUpdate- Changes to existing codeRemove- Removing code/filesImprove- EnhancementsMigrate- Data migrationsRevert- Reverting changes
Examples
# Simple commit
git commit -m "Add user authentication system"
# With issue reference
git commit -m "[PROJ-123] Fix login error handling"
# Multi-line
git commit -m "Add user profile component
Implements profile editing with avatar upload.
Includes form validation and error states."
Rules
- Verb in PascalCase
- Max 100 characters for header
- No trailing punctuation
- Subject required after verb
Pull Request Creation
Pre-PR Checklist
- Code follows style guidelines
- Tests pass locally
- No console.log statements
- No commented-out code
- Branch is up to date with base
Using GitHub CLI
# Create PR interactively
gh pr create
# Create PR with details
gh pr create \
--title "Add user authentication" \
--body "## Summary
Implements JWT authentication.
## Changes
- Add login endpoint
- Add token refresh
- Add protected routes
## Test Plan
1. Login with valid credentials
2. Verify token stored
3. Access protected route"
# Create draft PR
gh pr create --draft
PR Size Guidelines
- < 400 lines: Ideal, easy to review
- 400-800 lines: Consider splitting
- > 800 lines: Must split into smaller PRs
History Management
Interactive Rebase
# Rebase last 3 commits
git rebase -i HEAD~3
# Actions:
# pick - use commit
# reword - edit message
# squash - combine with previous
# fixup - combine, discard message
# drop - remove commit
Fixup Commits
# Create fixup for specific commit
git commit --fixup <commit-hash>
# Auto-squash when rebasing
git rebase -i --autosquash HEAD~5
Keep Branch Updated
git fetch origin
git rebase origin/master
# Force push if needed (only on feature branches!)
git push --force-with-lease
Checklist for Git Operations
Creating Branch
- Start from updated master/main
- Use correct branch type prefix
- Use kebab-case for branch name
Creating Commit
- Use allowed verb in PascalCase
- Message describes what AND why
- No WIP commits in final PR
Creating PR
- All tests pass
- PR description complete
- Linked to issues if applicable
- Requested reviewers
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon