git-town

Guide stacked-branch workflows with Git Town commands for create, sync, and ship.

14|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/gtheys/opencode --skill git-town-gtheys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-town
Source: https://github.com/gtheys/opencode/tree/main/global/skills/git-town
Command: npx skills add https://github.com/gtheys/opencode --skill git-town-gtheys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides teams to manage complex git workflows by using Git Town's stacked-branch system, reducing manual rebase pain and merge conflicts.

Core Features & Use Cases

  • Create and organize stacked branches with git town hack, append, and prepend
  • Keep stacks synchronized and rebased with git town sync and git town continue during conflicts
  • Expedite feature shipping by moving completed work toward PRs using git town ship

Quick Start

Install Git Town, initialize your repo with git town init, then start and manage stacked branches using git town hack, git town append, and git town sync, resolving conflicts with git town continue when needed.

Frequently Asked Questions about git-town

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

FAQPage Schema
How do I manage stacked branches in git without manual rebasing?

Stacked branches let you build features on top of each other, and Git Town automates the rebasing and syncing. You can create and organize stacks using git town hack, append, and prepend to keep dependent branches synchronized.

What's the best way to resolve merge conflicts during a git town sync?

When merge conflicts occur during a git town sync, you resolve them manually and then run git town continue to resume the process. This command picks up where the sync left off after you fix the conflicting files.

How do I ship a completed feature from a stacked branch?

To ship a completed feature, use git town ship to move your finished work toward the main branch and pull requests. This handles the branch deletion and restacking of any dependent branches above it.

Do I need to install Git Town separately to use stacked branch workflows?

Yes, Git and Git Town must be installed before you can use this workflow. You initialize your repository with git town init to configure the stacked branch settings before creating branches.

Can I prepend a new branch before an existing feature branch?

Yes, you can use git town prepend to insert a new branch at the bottom of an existing stack. This rebases the subsequent dependent branches onto the newly created branch automatically.

Why does rebasing a stacked branch cause conflicts in dependent branches?

Rebasing a stacked branch changes its commit history, which can cause conflicts in dependent branches built on top. Git Town syncs and restacks these branches automatically, using git town continue to resolve any conflicts.