https://github.com/yankeexe/git-worktree-switcher
Switch between git worktrees with speed. :zap:
https://github.com/yankeexe/git-worktree-switcher
bash cli cli-app commandline commandline-tool git linux productivity shell shell-script terminal-app workflow-management workflow-tool worktree zsh
Last synced: 8 months ago
JSON representation
Switch between git worktrees with speed. :zap:
- Host: GitHub
- URL: https://github.com/yankeexe/git-worktree-switcher
- Owner: yankeexe
- License: mit
- Created: 2021-04-09T17:19:36.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T01:43:10.000Z (over 1 year ago)
- Last Synced: 2025-03-02T14:19:18.090Z (8 months ago)
- Topics: bash, cli, cli-app, commandline, commandline-tool, git, linux, productivity, shell, shell-script, terminal-app, workflow-management, workflow-tool, worktree, zsh
- Language: Shell
- Homepage:
- Size: 16.6 KB
- Stars: 152
- Watchers: 3
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git worktree switcher:zap:
Switch between git worktrees with speed. :zap:

## Installation
Download the script from the [Release section](https://github.com/yankeexe/git-worktree-switcher/releases).
Make the script executable.
```bash
$ chmod +x wt
```
Copy the executable to any directory in your `$PATH`
```bash
$ sudo cp wt /usr/local/bin
```
## Tab Autocompletion :zap:
**For Bash**
```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
```bash
print -rl -- $fpath
```
Copy completion script to one of that location and restart the shell.
```bash
sudo cp completions/_wt_completion
exec zsh
```
**For Fish**
```bash
cp completions/wt.fish ~/.config/fish/completions
```
---
Tab autocompletion works for switching between your worktrees.
```bash
wt
# OR
wt
```
## Usage
Switch between worktrees.
You can do a text search to change to the worktree directory.
```bash
$ wt
```
Go to root worktree directory
```bash
$ wt -
```
List out all the worktrees.
```bash
$ wt list
```
Show help message
```bash
$ wt help
```
Update to the latest release
```bash
$ wt update
```
Show the CLI version
```bash
$ wt version
```