git-repository

Guide Git repository structure and branching strategy selection.

8|2|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/geoffjay/claude-plugins --skill git-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-repository
Source: https://github.com/geoffjay/claude-plugins/tree/main/plugins/utilities/git/skills/git-repository
Command: npx skills add https://github.com/geoffjay/claude-plugins --skill git-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Choosing the right repository structure (monorepo vs. polyrepo) and branching strategy (Git Flow, GitHub Flow, Trunk-Based) is crucial for team efficiency and project scalability, but often leads to confusion and suboptimal setups. This Skill provides clarity and best practices.

Core Features & Use Cases

  • Branching Strategies: Detailed explanations and workflows for Git Flow, GitHub Flow, Trunk-Based Development, and Release Branch strategies to optimize your team's development cycle.
  • Repository Organization: Guidance on Monorepo vs. Polyrepo, including advantages, disadvantages, and implementation details to make informed architectural decisions.
  • Submodule/Subtree Management: Instructions for effectively integrating and managing external dependencies or shared code within a larger repository.
  • Use Case: A lead developer needs to decide whether to adopt a monorepo for a new project or maintain a polyrepo structure. This Skill provides a decision matrix, implementation examples, and best practices for each approach, ensuring an informed choice that supports the team's long-term goals.

Quick Start

Git Flow: Start a new feature branch

git checkout develop git pull origin develop git checkout -b feature/user-authentication

GitHub Flow: Create a feature branch

git checkout main git pull origin main git checkout -b feature/add-api-logging

Frequently Asked Questions about git-repository

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

FAQPage Schema
What's the difference between monorepo and polyrepo repository structures?

Monorepo centralizes multiple projects in a single repository for unified versioning and dependency management, while polyrepo maintains separate repositories per project for autonomy and isolation. Choose monorepo for tightly coupled teams sharing code; polyrepo for independent services or distributed ownership.

How do I choose between Git Flow, GitHub Flow, and trunk-based development?

Git Flow suits complex releases with staging phases; GitHub Flow works for continuous deployment with main as production-ready; trunk-based development minimizes long-lived branches for rapid integration. Select based on your release cadence, team size, and deployment frequency.

How do I set up a feature branch in Git Flow?

In Git Flow, create feature branches from develop: git checkout develop, git pull origin develop, then git checkout -b feature/your-feature-name. Merge back to develop via pull request before releasing to main.

When should I use Git submodules versus subtrees for shared code?

Submodules reference external repositories with version pinning but require additional clone steps; subtrees embed external code directly into your repository for simplicity. Use submodules for loosely coupled dependencies; subtrees for tightly integrated shared code.

Can I manage multiple projects within a single Git repository?

Yes—monorepo structures organize multiple projects in one repository using directory hierarchies and shared tooling. Implement consistent branching strategies, CI/CD pipelines, and dependency management to coordinate across projects at scale.

What naming conventions should I follow for Git branches?

Use descriptive prefixes matching your strategy: feature/, bugfix/, hotfix/, release/ for Git Flow; feature/, or bugfix/ for GitHub Flow. Include issue numbers and kebab-case: feature/user-authentication, bugfix/issue-1234. Consistency aids automation and readability.