Skip to content

flexphere/gw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GW

gw is a simple wrapper around git worktree command. it adds a custom configuration per repository to specify the worktree path and commands to run on worktree creation.

Getting Started

Installation

download the binary from the releases page or install from source using the following command:

go install github.com/flexphere/gw@latest

Usage

Setup current repository

gw init \
--worktree-path ~/.worktree \         # setup current repository to create its worktrees under "~/.worktree"
--cmd "echo hello" --cmd "echo world" # run `echo hello` and `echo world` on worktree creation

Creating new worktree

gw new name-of-worktree

Editing the config

gw edit # opens the config file in the editor

Passthrough

every other command then above is redirected to git worktree command

gw list # executes `git worktree list`
gw prune # executes `git worktree prune`
...