Back to list
1ambda

git-workflow

by 1ambda

2🍴 0📅 Jan 21, 2026

SKILL.md


name: git-workflow description: Git workflow automation including commit messages, PR management, and branch strategies. Handles merge conflicts and maintains clean history. Use when committing, creating PRs, or managing branches.

Git Workflow

Git operations including commits, PRs, branches, and conflict resolution.

When to Use

  • Commit message writing
  • Pull request creation
  • Branch management
  • Merge conflict resolution
  • History cleanup

MCP Workflow

# View changes
git status
git diff

# Recent commits (for style)
git log --oneline -10

# Stage and commit
git add <files>
git commit -m "type(scope): message"

# Create PR
gh pr create --title "title" --body "body"

Commit Convention

Format

<type>(<scope>): <subject>

[body]

[footer]

Types

TypeDescription
featNew feature
fixBug fix
docsDocumentation
styleFormatting
refactorCode restructure
perfPerformance
testTests
buildBuild system
ciCI configuration
choreMaintenance

Rules

  • Imperative mood ("add" not "added")
  • No period at end
  • Max 50 characters
  • Lowercase first letter

Example

feat(order): add order cancellation

Users can cancel orders within 24 hours.

- Add OrderCancellationService
- Integrate with RefundService

Closes #123

Branch Naming

<type>/<issue>-<description>

feature/123-user-auth
bugfix/456-null-pointer
hotfix/789-security-patch

PR Template

## Summary
- [bullet points]

## Type
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change

## Test Plan
- [ ] Unit tests
- [ ] Integration tests

Closes #[issue]

Conflict Resolution

# Update branch
git fetch origin
git rebase origin/main

# Identify conflicts
git status

# Resolve, then mark
git add <resolved-file>
git rebase --continue

History Management

Squash Commits

git rebase -i HEAD~3
# Change "pick" to "squash" for commits to combine

Amend Last Commit

git add forgotten-file
git commit --amend --no-edit

Cherry Pick

git cherry-pick abc123

Common Commands

# Start work
git checkout main && git pull
git checkout -b feature/xxx

# Save WIP
git stash
git stash pop

# View history
git log --oneline --graph -20

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Delete branch
git branch -d feature/xxx
git push origin --delete feature/xxx

# Force push (safer)
git push --force-with-lease

Output Format

## Git: [operation]

### Commit

feat(user): add password reset

  • Add PasswordResetService
  • Add tests

### Files
- `UserService.kt` (+50/-10)

### Next
- [ ] Push
- [ ] Create PR

Safety Rules

  • NEVER force push to main/develop
  • NEVER rewrite shared history
  • ALWAYS use --force-with-lease not --force
  • ALWAYS verify branch before destructive ops

GitHub Commands

# Create PR
gh pr create --title "feat: feature" --body "## Summary..."

# View PR
gh pr view <PR> --json files,additions,deletions

# Approve
gh pr review <PR> --approve --body "LGTM"

# Merge
gh pr merge <PR> --squash

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