# Git Workflow

> Guide Git workflows including branching strategies, commit conventions, and PR management. Use this skill when users need help with Git operations, branch management, commit messages, or establishing team Git workflows.

- **Type:** Skill
- **Install:** `agentstack add skill-roboco-io-plugins-git-workflow`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [roboco-io](https://agentstack.voostack.com/s/roboco-io)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [roboco-io](https://github.com/roboco-io)
- **Source:** https://github.com/roboco-io/plugins/tree/main/plugins/workflow/skills/git-workflow

## Install

```sh
agentstack add skill-roboco-io-plugins-git-workflow
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Git Workflow Skill

You are an expert in Git version control and team collaboration workflows.

## Commit Message Convention

### Format
```
(): 

```

### Types
| Type | Description |
|------|-------------|
| feat | New feature |
| fix | Bug fix |
| docs | Documentation only |
| style | Code style (formatting, semicolons) |
| refactor | Code change that neither fixes nor adds |
| perf | Performance improvement |
| test | Adding or updating tests |
| chore | Build process or auxiliary tools |
| ci | CI configuration changes |

### Examples
```
feat(auth): add OAuth2 login support

Implement Google and GitHub OAuth2 providers.
Users can now link multiple social accounts.

Closes #123
```

```
fix(api): handle null response from payment service

The payment service returns null for cancelled transactions.
Added null check to prevent TypeError.

Fixes #456
```

## Branching Strategies

### GitHub Flow (Recommended for most teams)
```
main (production-ready)
  └── feature/add-login
  └── feature/update-dashboard
  └── fix/payment-bug
```

**Rules:**
- `main` is always deployable
- Create feature branches from `main`
- Open PR when ready for review
- Merge to `main` after approval
- Deploy immediately after merge

### Git Flow (For scheduled releases)
```
main (production)
develop (integration)
  └── feature/add-login
  └── release/v1.2.0
  └── hotfix/critical-bug
```

**Rules:**
- `main` reflects production
- `develop` is integration branch
- Feature branches from `develop`
- Release branches for final prep
- Hotfix branches from `main`

## Branch Naming Convention

```
/-

Examples:
feature/AUTH-123-oauth-login
fix/BUG-456-null-pointer
chore/INFRA-789-update-deps
```

## Pull Request Guidelines

### PR Title
Follow commit message format:
```
feat(auth): add OAuth2 login support
```

### PR Description Template
```markdown
## Summary
Brief description of changes

## Changes
- Change 1
- Change 2

## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed

## Screenshots (if applicable)

## Related Issues
Closes #123
```

### Review Checklist
- [ ] Code follows project conventions
- [ ] Tests are included and passing
- [ ] Documentation is updated
- [ ] No sensitive data exposed
- [ ] Breaking changes are documented

## Common Operations

### Rebase vs Merge
**Use Rebase:**
- Updating feature branch with main
- Cleaning up local commits before PR
- Linear history preferred

**Use Merge:**
- Merging PR to main
- Preserving branch history
- Team policy requires merge commits

### Interactive Rebase
```bash
# Squash last 3 commits
git rebase -i HEAD~3

# Rebase onto main
git rebase -i main
```

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

# Undo last commit (discard changes)
git reset --hard HEAD~1

# Revert a pushed commit
git revert 
```

## Best Practices

1. **Commit Often, Push Regularly**
   - Small, atomic commits
   - Push at least daily

2. **Write Meaningful Messages**
   - Explain why, not just what
   - Reference issues/tickets

3. **Keep Branches Short-lived**
   - Merge within days, not weeks
   - Delete branches after merge

4. **Review Before Merging**
   - At least one approval required
   - CI checks must pass

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [roboco-io](https://github.com/roboco-io)
- **Source:** [roboco-io/plugins](https://github.com/roboco-io/plugins)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-roboco-io-plugins-git-workflow
- Seller: https://agentstack.voostack.com/s/roboco-io
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
