git-workflow-and-versioning

Structure git workflows with trunk-based development, atomic commits, and branch naming conventions.

1|Updated Jan 28, 2025
One-click install
npx skills add https://github.com/josuenavarroaguado/josuenavarroaguado.github.io --skill git-workflow-and-versioning-josuenavarroaguado
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow-and-versioning
Source: https://github.com/josuenavarroaguado/josuenavarroaguado.github.io/tree/main/.github/skills/git-workflow-and-versioning
Command: npx skills add https://github.com/josuenavarroaguado/josuenavarroaguado.github.io --skill git-workflow-and-versioning-josuenavarroaguado

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a disciplined, repeatable approach to using Git so code changes remain manageable, reviewable, and reversible; it prevents large, risky commits, long-lived divergent branches, and unclear history that slow delivery and increase deployment risk.

Core Features & Use Cases

  • Trunk-Based Development Guidance: Keep main deployable, use short-lived feature branches, prefer feature flags for incomplete work.
  • Commit Discipline: Commit early and often, make atomic commits, write descriptive messages that explain the why, and separate concerns across commits and PRs.
  • Branching, Worktrees, and Debugging Patterns: Naming conventions, worktree usage for parallel agent work, git bisect/blame/diff patterns for troubleshooting.
  • Pre-Commit Hygiene & Change Summaries: Run tests, lint, type checks before committing and include a CHANGES summary and "didn't touch" notes to clarify scope.
  • Use Case: When an engineer or an AI agent implements a small feature, follow these patterns to produce short-lived branches, clear commit history, and a targeted PR that is easy to review and revert if necessary.

Quick Start

Use this skill to produce a branch name, three atomic commit messages, and a concise change summary for a small feature following trunk-based principles.

Frequently Asked Questions about git-workflow-and-versioning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is trunk-based development and how does it keep main deployable?

Atomic commits involve committing early and often with descriptive messages that explain the why. This separates concerns across commits and PRs, preventing large risky commits and unclear history that slow delivery and increase deployment risk.

How do I structure git workflows for parallel agent work?

Structure git workflows for parallel agent work using git worktrees. This pattern allows multiple branches to be checked out simultaneously, enabling parallel development while enforcing branch naming conventions and keeping main deployable.

What's the best way to write commit messages for collaborative code changes?

Write descriptive commit messages that explain the why, make atomic commits, and separate concerns across commits. Include a CHANGES summary and 'didn't touch' notes to clarify scope, ensuring changes remain reviewable and reversible.

Does pre-commit hygiene require running tests and lint checks before committing?

Yes, pre-commit hygiene requires running tests, lint, and type checks before committing. This disciplined approach prevents broken code from entering main, keeping branches short-lived and ensuring the trunk remains deployable.

Can I use git bisect and blame patterns for debugging workflow issues?

Yes, use git bisect, blame, and diff patterns for troubleshooting. These debugging techniques, combined with atomic commits and descriptive messages, help pinpoint when issues were introduced and keep code changes reversible.