Skip to content

mittalyashu/git-worktree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

git-worktree

Effortless multi-branch development—automate your worktree setup and get coding instantly!

Table of Contents

Overview

Managing multiple feature branches or environments in a single Git repository can quickly become messy and repetitive. While git worktree helps by allowing you to check out multiple branches at once, it still requires manual setup for each worktree—copying config files, installing dependencies, and starting development environments.

This repository solves that pain point.

Why use this?

  • No more manual setup: Stop repeating the same steps for every new branch.
  • Consistent environments: Ensure every worktree has the right configs and dependencies.
  • Customizable: Easily extend the script to fit your workflow.

Features

This project provides a simple Bash script (worktree.sh) that extends the functionality of git worktree. With a single command, you can:

  • Create a new worktree for any branch (existing or new)
  • Automatically copy essential configuration files (like .env)
  • Install dependencies using pnpm (or fallback to pkgx)
  • Spin up your development environment instantly using Docker Compose

Installation

Simple copy-paste this file into your repository at the root.

./worktree.sh <branch-name>

You can modify the script to copy other files, run additional setup commands, or integrate with other tools as needed.

**Stop wasting time on repetitive setup. Let this script handle your worktree environments, so you can focus

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages