git-worktree-runner  by coderabbitai

Git worktree manager for parallel development

Created 3 months ago
723 stars

Top 47.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Bash-based CLI tool, git-gtr, to simplify and automate the management of Git worktrees. It targets developers seeking to improve parallel development workflows, especially when integrating with modern editors and AI coding assistants, by abstracting away the verbosity of native Git commands.

How It Works

git-gtr acts as a wrapper around git worktree, offering intuitive commands for creating, opening, managing, and removing worktrees. It automates common setup tasks like copying configuration files, installing dependencies via customizable hooks, and launching integrated editors or AI tools. This approach significantly enhances developer experience (DX) for parallel branch development.

Quick Start & Requirements

Installation involves cloning the repository and creating a symbolic link to the bin/git-gtr executable in the system's PATH.

  • Primary Install: git clone https://github.com/coderabbitai/git-worktree-runner.git && cd git-worktree-runner && sudo ln -s "$(pwd)/bin/git-gtr" /usr/local/bin/git-gtr
  • Requirements: Git 2.5+ (2.25+ recommended), Bash 3.2+ (4.0+ recommended).
  • Setup Time: Installation is estimated at 30 seconds.
  • Docs: Official repository: https://github.com/coderabbitai/git-worktree-runner

Highlighted Details

  • Streamlined CLI commands for worktree lifecycle management (new, editor, ai, list, rm).
  • Deep integration with editors (Cursor, VS Code, Zed) and AI tools (Aider, Claude Code, Codex).
  • Automated post-creation hooks for dependency installation and build steps.
  • Configurable file copying for environment variables and configuration files.
  • Repository-scoped worktree management, preventing cross-repo interference.
  • Cross-platform compatibility across macOS, Linux, and Windows (via Git Bash/WSL).

Maintenance & Community

The project is copyrighted by CodeRabbit. Contributions are welcomed, with specific areas for new editor/AI adapters and bug reports highlighted. No explicit community channels (like Discord/Slack) or prominent maintainer information are detailed in the README.

Licensing & Compatibility

Licensed under the Apache License 2.0. This license permits commercial use and integration into closed-source projects without copyleft restrictions.

Limitations & Caveats

Version 2.0 introduced a command rename from gtr to git gtr. Bash shell completions require bash-completion v2+. Native Windows support is experimental; Git Bash or WSL2 is recommended. The --force flag for managing multiple worktrees on the same branch should be used cautiously due to potential merge conflicts. Older Git versions (2.5-2.21) offer basic support with limited features.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
20
Issues (30d)
8
Star History
724 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.