git-workflow-and-versioning

Structures git commits, branching, and worktree workflows for disciplined version control.

Updated Jun 13, 2026
One-click install
npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill git-workflow-and-versioning-22teikk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-workflow-and-versioning
Source: https://github.com/22Teikk/22Teikk-Agent-Skills-Hub/tree/main/core/skills/git-workflow-and-versioning
Command: npx skills add https://github.com/22Teikk/22Teikk-Agent-Skills-Hub --skill git-workflow-and-versioning-22teikk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents generate code at high speed, and without disciplined version control, changes become unreviewable, irreversible, and hard to debug. This Skill enforces commit discipline, branching strategy, and history hygiene so every change stays manageable and recoverable. ## Core Features & Use Cases - Atomic Commit Discipline: Enforces small, single-purpose commits with conventional message types (feat, fix, refactor, test, docs, chore) and ~100-line change sizing. - Trunk-Based Branching: Guides short-lived feature branches (1-3 days), branch naming conventions, and feature flags over long-lived branches. - Parallel Work with Worktrees: Uses git worktrees so multiple agents work on separate branches simultaneously without interference. - Use Case: An agent implements a task creation feature across four commits (endpoint, form, integration, tests), each verified before committing, so a failing step can be reverted instantly with git reset without losing prior work. ## Quick Start Use the git-workflow-and-versioning skill to commit my current changes as atomic commits with descriptive conventional messages.

Frequently Asked Questions about git-workflow-and-versioning

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

FAQPage Schema
How do I write good git commit messages?▼

Use the format 'type: short description' with types like feat, fix, refactor, test, docs, or chore. The body should explain why the change was made, not what changed, since the diff already shows the what.

How to split large git commits into smaller ones?▼

Target around 100 lines per commit and split anything approaching 1000 lines. Separate refactoring from feature work into distinct commits, and keep formatting changes apart from behavior changes so each commit does one logical thing.

What is trunk-based development vs gitflow?▼

Trunk-based development keeps main always deployable with short-lived feature branches merged within 1-3 days. Gitflow uses long-lived development branches, which accumulate merge risk; the commit discipline principles apply to either model.

How do git worktrees help parallel development?▼

Git worktrees let you check out multiple branches in separate directories simultaneously, so agents or developers work in parallel without branch switching. Use 'git worktree add ../project-feature feature/name' and remove it after merging.

Should generated files and build output be committed to git?▼

Commit generated files only when the project expects them, like gradle-wrapper.jar or libs.versions.toml. Never commit build output, local.properties, secrets, or IDE configs; cover these with a .gitignore including build/, .gradle/, and *.apk.

How do I find which commit introduced a bug?▼

Use git bisect: mark a bad commit with 'git bisect bad HEAD' and a known-good one with 'git bisect good <commit>', then git checks out midpoints for you to test. Combine with git log --grep and git blame to narrow down changes.