Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsJul 26, 2026·3 min de lecture

Git Town — High-Level Git Workflow Automation

A CLI tool that adds high-level commands to Git for common team workflows like creating feature branches, syncing with upstream, and shipping changes with fewer manual steps.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Git Town Overview
Commande d'installation directe
npx -y tokrepo@latest install 24ec7ef7-888c-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

Git Town adds high-level commands to Git that automate common team workflows. Instead of running multiple git commands to create branches, sync with upstream, and merge changes, Git Town combines these into single commands that handle rebasing, fetching, and branch management automatically.

What Git Town Does

  • Creates feature branches with proper parent tracking via git town hack
  • Syncs branches with their parent and upstream via git town sync
  • Ships completed features by merging and cleaning up branches
  • Manages branch hierarchies for stacked PRs and dependent features
  • Handles merge conflicts with a guided resolution workflow

Architecture Overview

Git Town is a single Go binary that wraps Git commands into higher-level operations. It stores branch metadata (parent relationships, branch types) in Git config. Each command decomposes into a sequence of Git operations executed atomically with undo support. If a conflict occurs mid-operation, Git Town pauses and resumes after manual resolution.

Self-Hosting & Configuration

  • Install via Homebrew, Scoop, AUR, or download prebuilt binaries
  • Run git town config setup for interactive repo configuration
  • Set the main branch and perennial branches in git config
  • Configure sync strategy (rebase or merge) per repository
  • Supports both GitHub and GitLab for PR/MR integration

Key Features

  • Atomic multi-step operations with full undo support
  • Stacked changes workflow for dependent feature branches
  • Offline mode queues sync operations for later execution
  • Parking and prototype branch types for work-in-progress management
  • Shell completions for Bash, Zsh, Fish, and PowerShell

Comparison with Similar Tools

  • git-flow — Prescribes a specific branching model; Git Town is workflow-agnostic and simpler
  • GitHub CLI (gh) — Manages PRs and issues; Git Town focuses on local branch workflow automation
  • Trunk — Merge queue service; Git Town handles local development workflow, not CI merging
  • git-branchless — Focuses on stacked diffs; Git Town covers broader workflow automation

FAQ

Q: Does Git Town replace standard Git commands? A: No. It adds new commands (git town hack, sync, ship) alongside existing Git commands. Standard Git still works normally.

Q: Can I undo a Git Town operation? A: Yes. git town undo reverts the last Git Town command, restoring branches and commits to their previous state.

Q: Does Git Town work with monorepos? A: Yes. Branch tracking and sync work regardless of repo structure. Configuration is per-repository.

Q: What happens during a sync conflict? A: Git Town pauses the operation, lets you resolve the conflict manually, then run git town continue to finish.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires