Skip to content

About

Collection of useful git utility scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

git-toolkit

A growing collection of shell utilities for common git workflows.

Tools

worktree-helper

Create git worktrees for one or more features and open each in a new VS Code window.

./worktree-helper.sh <feature1> [feature2 ...]

What it does:

  1. Creates a branch feat/<sanitized-name> from a base branch (default: main)
  2. Adds a git worktree at <repo-parent>/<repo-name>-<sanitized-name> (sibling of your repo, never inside it)
  3. Opens the worktree in a new VS Code window

Feature names are sanitized automatically: lowercased, non-alphanumeric characters collapsed to -, leading/trailing dashes stripped.

Options:

Flag Description
--base <branch> Branch to create from (default: main)
--no-open Skip opening VS Code windows
-h, --help Show usage info

Examples:

# Single worktree from main
./worktree-helper.sh user-auth

# Multiple worktrees at once
./worktree-helper.sh user-auth payment-integration

# From a different base branch
./worktree-helper.sh --base develop hotfix-login

# Create without opening VS Code
./worktree-helper.sh --no-open refactor-api

Requirements: git, bash. VS Code opening uses code -n with a macOS fallback to open -a "Visual Studio Code".

About

Collection of useful git utility scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages