Skip to content
Back to skills

Git Workflow

ASecurity

Git workflow management. Triggers when creating branches, preparing PRs, or managing merge decisions.

  • 34 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 7, 2026
developmentbashgitdocumentation

Works with

  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add muyen/vibe-to-prod --skill git-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/muyen-git-workflow/badge)](https://www.skillsdirectory.com/skills/muyen-git-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-workflow
description: Git workflow management. Triggers when creating branches, preparing PRs, or managing merge decisions.
---

# Git Workflow Skill

Manage git branches, commits, and pull requests following project conventions.

## When to Activate

This skill should activate when:
- Starting work on a new feature/fix
- Creating a new feature branch
- Preparing to create a pull request
- Deciding whether to merge or rebase
- Resolving merge conflicts

## Branch Naming Convention

```
<type>/<short-description>

Examples:
- feature/add-user-profile
- fix/login-redirect-bug
- chore/update-dependencies
```

## Commit Message Format

```
type: description

Types:
- feat:     New feature
- fix:      Bug fix
- docs:     Documentation
- style:    Formatting (no code change)
- refactor: Code restructuring
- test:     Adding tests
- chore:    Maintenance

Examples:
- feat: add user profile endpoint
- fix: resolve login redirect issue
- chore: update dependencies
```

## Workflow Steps

### 1. Start New Work
```bash
# Ensure main is up to date
git checkout main
git pull origin main

# Create feature branch
git checkout -b feature/description
```

### 2. During Development
```bash
# Stage changes
git add -p  # Interactive staging (review each change)

# Commit with conventional format
git commit -m "type: description"

# Push regularly
git push -u origin branch-name
```

### 3. Before PR
```bash
# Ensure all tests pass
make test  # or appropriate test command

# Rebase on latest main (if needed)
git fetch origin main
git rebase origin/main

# Force push after rebase
git push --force-with-lease
```

### 4. Create PR
```bash
# Using GitHub CLI
gh pr create --title "type: description" \
  --body "## Summary
- What this PR does

## Test Plan
- How to test"
```

## Merge vs Rebase Decision

| Situation | Action |
|-----------|--------|
| Feature branch behind main | Rebase onto main |
| Shared branch (multiple devs) | Merge, don't rebase |
| Before PR | Rebase + squash if messy |
| After PR approved | Squash merge via GitHub |

## Conflict Resolution

```bash
# During rebase conflict
git status  # See conflicted files
# Edit files to resolve conflicts
git add <resolved-files>
git rebase --continue

# If too messy, abort and merge instead
git rebase --abort
git merge origin/main
```

## Rules

- **Never** force push to main/master
- **Always** run tests before creating PR
- **Squash merge** feature branches to keep history clean

## Output Format

```
## Git Workflow

**Branch**: `feature/description`
**Base**: `main`
**Commits**: X commits

### Pre-PR Checklist
- [ ] Tests passing
- [ ] Rebased on latest main
- [ ] Commit messages follow convention
- [ ] No merge conflicts

### Ready for PR
```bash
gh pr create --title "..." --body "..."
```
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…