원클릭으로
git-workflow-guide
Provide guidance on git workflows, branching strategies, and best practices for individual and team development
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Provide guidance on git workflows, branching strategies, and best practices for individual and team development
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Maintain and organize a curated library of code templates, boilerplate, and scaffolds for rapid project initialization
Generate reusable, customizable code snippets for common programming patterns and boilerplate code across multiple languages
Generate clear, conventional, and meaningful commit messages following best practices and conventional commit standards
Generate personalized, context-aware greetings for developers at different times of day and moods
Provide inspiring coding wisdom, productivity tips, and encouragement to keep developers motivated and focused
Science-backed techniques for maintaining deep focus, managing distractions, and maximizing productive coding sessions
| name | Git Workflow Guide |
| description | Provide guidance on git workflows, branching strategies, and best practices for individual and team development |
Provide comprehensive guidance on:
Invoke this skill when:
Determine:
Choose appropriate workflow based on context:
Based on the user's question, provide detailed guidance on:
Branches:
main: Always deployable, production codefeature/*: Short-lived feature branchesWorkflow:
# 1. Create feature branch from main
git checkout main
git pull origin main
git checkout -b feature/user-authentication
# 2. Make changes and commit
git add .
git commit -m "feat(auth): add login functionality"
# 3. Push and create pull request
git push -u origin feature/user-authentication
# 4. After review, merge to main
# (Usually done via PR interface)
# 5. Delete feature branch
git branch -d feature/user-authentication
Best for:
Branches:
main: Production-ready codedevelop: Integration branch for featuresfeature/*: New featuresrelease/*: Release preparationhotfix/*: Emergency fixesWorkflow:
# Feature development
git checkout develop
git checkout -b feature/shopping-cart
# ... make changes ...
git checkout develop
git merge --no-ff feature/shopping-cart
# Release preparation
git checkout -b release/1.2.0 develop
# ... version bumps, final testing ...
git checkout main
git merge --no-ff release/1.2.0
git tag -a v1.2.0
git checkout develop
git merge --no-ff release/1.2.0
# Hotfix
git checkout -b hotfix/1.2.1 main
# ... fix critical bug ...
git checkout main
git merge --no-ff hotfix/1.2.1
git tag -a v1.2.1
git checkout develop
git merge --no-ff hotfix/1.2.1
Best for:
Branches:
main: The trunk, always deployablefeature/*: Very short-lived (< 2 days)Workflow:
# Create short-lived branch
git checkout -b feature/quick-fix
# Small, frequent commits
git commit -m "feat: add validation"
git commit -m "test: add validation tests"
# Merge quickly (same day or next)
git checkout main
git pull --rebase origin main
git merge feature/quick-fix
git push origin main
Key practices:
Best for:
feature/user-authentication
feature/add-shopping-cart
feature/implement-search
feat/user-profile-page
fix/login-timeout
fix/memory-leak-in-parser
bugfix/null-pointer-exception
hotfix/security-patch
hotfix/critical-data-loss
release/1.2.0
release/2024-03-15
release/sprint-42
chore/upgrade-dependencies
chore/update-documentation
refactor/extract-validation-logic
✅ Merging feature branch into main/develop ✅ Preserving complete history is important ✅ Working on public/shared branches ✅ Multiple people worked on the branch
git checkout main
git merge --no-ff feature/user-auth
Pros: Preserves history, safe, easy to understand Cons: Creates merge commits, more complex history
✅ Updating feature branch with latest main ✅ Cleaning up local commits before PR ✅ Want linear history ✅ Working on personal branch
git checkout feature/user-auth
git rebase main
Pros: Clean linear history, no merge commits Cons: Rewrites history, can be dangerous on shared branches
✅ Merging PR with many small commits ✅ Want one commit per feature ✅ Cleanup experimental commits
git merge --squash feature/user-auth
git commit -m "feat(auth): add complete user authentication"
Pros: Clean main history, one commit per feature Cons: Loses granular history
✅ Commit early and often (on feature branches) ✅ Write meaningful commit messages ✅ Pull before you push ✅ Keep commits atomic (one logical change) ✅ Test before committing ✅ Use branches for all changes ✅ Delete merged branches
❌ Commit directly to main/develop ❌ Force push to shared branches ❌ Commit large binary files ❌ Mix multiple concerns in one commit ❌ Commit broken code ❌ Rewrite public history ❌ Ignore merge conflicts
# Morning: Start fresh
git checkout main
git pull origin main
git checkout -b feature/new-feature
# During day: Commit frequently
git add src/component.ts
git commit -m "feat: add user component"
git add tests/component.test.ts
git commit -m "test: add component tests"
# End of day: Push work
git push -u origin feature/new-feature
# Next day: Update with latest main
git checkout main
git pull origin main
git checkout feature/new-feature
git rebase main # or merge main
# When done: Create PR
# (via GitHub/GitLab interface)
# After merge: Cleanup
git checkout main
git pull origin main
git branch -d feature/new-feature
# When merge conflict occurs
git merge feature/other-feature
# CONFLICT (content): Merge conflict in src/app.ts
# Option 1: Use merge tool
git mergetool
# Option 2: Edit manually
# Edit src/app.ts, resolve conflicts
git add src/app.ts
git commit -m "merge: resolve conflicts from feature/other-feature"
# Option 3: Abort and try differently
git merge --abort
git rebase feature/other-feature # Try rebase instead
# Emergency fix needed in production
git checkout main
git checkout -b hotfix/critical-security-fix
# Make minimal fix
git add security/auth.ts
git commit -m "fix(security): patch XSS vulnerability"
# Test thoroughly
npm test
# Merge to main
git checkout main
git merge --no-ff hotfix/critical-security-fix
git tag -a v1.2.1 -m "Security hotfix"
git push origin main --tags
# Also merge to develop
git checkout develop
git merge --no-ff hotfix/critical-security-fix
git push origin develop
# Deploy immediately
git branch -d hotfix/critical-security-fix
# Move last commit to new branch
git branch feature/correct-branch
git reset HEAD~ --hard
git checkout feature/correct-branch
# Keep changes, undo commit
git reset HEAD~
# Discard changes too
git reset HEAD~ --hard
git commit --amend -m "New commit message"
git add forgotten-file.ts
git commit --amend --no-edit
git checkout feature/my-branch
git merge main
# or
git rebase main
# See conflicted files
git status
# Edit conflicts in files
# Look for <<<<<<, ======, >>>>>>
# Mark as resolved
git add resolved-file.ts
git commit
When providing workflow guidance:
## Recommended Workflow: [Name]
**Best for your situation because:**
- [Reason 1]
- [Reason 2]
**Branch structure:**
- [Branch type]: [Purpose]
**Step-by-step:**
1. [Step]
2. [Step]
**Key commands:**
```bash
[Command examples]
Tips:
## Related Skills
- `commit-message-generator`: For writing better commits
- `pr-description-generator`: For pull requests
- `conflict-resolver`: For handling merge conflicts
- `git-history-cleaner`: For cleaning up history before PR