GitHub - Alvaroak/git-worktree-switcher: Switch between git worktrees with ease. :zap:

Switch between git worktrees with speed. ⚡

demo of switching between git worktrees

Installation

Download the script from the Release section.

Make the script executable.

Copy the executable to any directory in your $PATH

$ sudo cp wt /usr/local/bin

Tab Autocompletion ⚡

For Bash

sudo cp completions/wt_completion /etc/bash_completion.d

For ZSH

Note: completion file for zsh has _ prefix

Find paths where you can store your completion

Copy completion script to one of that location and restart the shell.

sudo cp completions/_wt_completion <one-of-$fpath>

exec zsh

For Fish

cp completions/wt.fish ~/.config/fish/completions

Tab autocompletion works for switching between your worktrees.

wt <TAB> <TAB>

# OR

wt <completion-characters> <TAB>

Usage

Switch between worktrees. You can do a text search to change to the worktree directory.

$ wt <worktree-name/search-term>

Go to root worktree directory

List out all the worktrees.

Show help message

Update to the latest release

Show the CLI version