zsh plugins for working with git worktree
###Install the plugin
zsh (cd $ZSH_CUSTOM; git clone [email protected]:jspears/worktree.git)
Edit .zshrc
find the plugins
variable
add 'worktree' to the list
plugins=(worktree zsh-nvm git npm )
There are 2 ENV variables to configure
WORKTREE_CODE_DIR
- what directory to look for projectsWORKTERE_CODE_EDITOR
- what to use as an IDE. If unset it will not prompt to open IDE in new worktreeWORKTREE_POST_SWITCH
- A command to run after switchin (maybe npm install?)WORKTREE_POST_CREATE
- A command to run after creating a new worktree.
A relatively modern version of git and oh-my-zsh