# Git Workflow

> Use when the user asks to "commit", "create PR", "branch", "merge", "rebase", "cherry-pick", "tag", or otherwise manage git history. Guides disciplined git operations — branching, commits, PRs, and recovery.

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

## Install

```sh
agentstack add skill-arozumenko-sdlc-skills-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

Disciplined git operations for professional codebases.

## Platform & systems

Commands below use **GitHub `gh`** as the reference. Translate to your code host
per `.agents/workflow.md` § Git host — GitLab `glab`, Bitbucket `bb`, Azure
DevOps `az repos`, Gitea `tea`. "PR" means PR or MR. If scout hasn't recorded a
host, ask before assuming GitHub.

## Before Any Git Operation

```bash
git --no-pager status
git --no-pager log --oneline -5
git --no-pager diff --stat
```

Always know the current state before changing it.

## Branching

```bash
# Feature branch from main
git checkout main && git pull && git checkout -b feat/short-description

# Bug fix
git checkout main && git pull && git checkout -b fix/issue-description
```

Branch naming: `feat/`, `fix/`, `chore/`, `docs/` prefixes. Lowercase, hyphens, concise.

## Commits

**Never commit unless the user explicitly asks.** When they do:

1. Stage specific files (not `git add -A` — avoid secrets and binaries)
2. Write a message that explains *why*, not *what*
3. Keep commits focused — one concern per commit

```bash
git add src/auth.py src/middleware.py
git commit -m "$(cat 
EOF
)"
```

## Pull Requests

When asked to create a PR:

1. Check all commits since divergence: `git --no-pager log main..HEAD --oneline`
2. Review full diff: `git --no-pager diff main...HEAD`
3. Push with tracking: `git push -u origin HEAD`
4. Create with structured body:

```bash
gh pr create --title "Short title under 70 chars" --body "$(cat <<'EOF'
## Summary
- What changed and why (2-3 bullets)

## Test plan
- [ ] How to verify this works

Generated with Claude Code
EOF
)"
```

## Dangerous Operations

**Always confirm with the user before:**
- `git push --force` (any variant)
- `git reset --hard`
- `git branch -D`
- `git rebase` on shared branches
- `git checkout .` or `git restore .` (discards work)

**Never:**
- Skip hooks (`--no-verify`)
- Force push to main/master
- Amend published commits
- Use interactive flags (`-i`) — not supported in non-interactive shells

## Recovery

See `references/recovery.md` for common recovery scenarios.

## Source & license

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

- **Author:** [arozumenko](https://github.com/arozumenko)
- **Source:** [arozumenko/sdlc-skills](https://github.com/arozumenko/sdlc-skills)
- **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-arozumenko-sdlc-skills-git-workflow
- Seller: https://agentstack.voostack.com/s/arozumenko
- 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%.
