git-workflow-and-versioning

Structure git workflows with branching, atomic commits, and pre-commit checks.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/harishgovardhandamodar/adversarialStudy --skill git-workflow-and-versioning-harishgovardhandamodar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow-and-versioning
Source: https://github.com/harishgovardhandamodar/adversarialStudy/tree/main/Distributionally-Adversarial-Attack/.agents/skills/git-workflow-and-versioning
Command: npx skills add https://github.com/harishgovardhandamodar/adversarialStudy --skill git-workflow-and-versioning-harishgovardhandamodar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a clear, repeatable git workflow to prevent chaotic or unreviewable changes, reduce merge conflicts, and ensure commits are meaningful and reversible when multiple contributors or AI agents modify code.

Core Features & Use Cases

  • Branching and Naming Conventions: Guidance for short-lived feature branches, branch naming patterns, and when to use release branches or feature flags.
  • Commit Discipline: Rules for atomic commits, descriptive messages that explain intent, and recommended commit message types to preserve history.
  • Pre-commit Hygiene & Verification: Checklist for staged-diff review, secret scanning, tests, linting, and type checks before committing.
  • Worktrees and Parallel Agent Work: How to use git worktrees to run parallel experiments or agent workflows without branch switching.
  • Use Case: When multiple AI agents implement concurrent features, use this workflow to isolate changes, run automated checks, and produce small, reviewable commits that merge quickly into main.

Quick Start

Create a short-lived feature branch from main, implement a focused change with tests, run the pre-commit checks, and commit with an atomic, descriptive message following the project's commit type conventions.

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 structure a git workflow for multiple AI agents modifying code?

To structure a git workflow for multiple agents, use short-lived feature branches and git worktrees to isolate parallel experiments. This prevents chaotic changes and ensures all commits remain small, traceable, and reviewable before merging into main.

What is the best way to write atomic git commits for feature development?

The best way to write atomic git commits is to group focused changes with descriptive messages that explain intent. Following project commit type conventions preserves history and keeps code changes meaningful and reversible during feature development.

How do pre-commit checks work with feature branches?

Pre-commit checks on feature branches require a staged-diff review, secret scanning, tests, linting, and type checks before committing. This hygiene gate ensures that only verified, clean code changes merge quickly into the main branch.

When do I need git worktrees for parallel experiments?

You need git worktrees when running parallel experiments or agent workflows without branch switching. Worktrees isolate changes in separate directories, allowing concurrent feature development while keeping code changes safe and reviewable.

Can I use trunk-based development with this git versioning approach?

Yes, this git versioning approach satisfies trunk-based development requirements by guiding short-lived feature branches, atomic commits, and pre-commit verification gates. It ensures changes merge quickly and cleanly into the main trunk.

Why should I run pre-commit checks before merging generated files?

Running pre-commit checks before merging generated files ensures that linting, type checks, and secret scanning validate all changes. This prevents unreviewable or broken modifications from entering the main branch and maintains commit hygiene.