https://github.com/jspears/worktree
zsh plugins for working with git worktree
https://github.com/jspears/worktree
Last synced: 4 months ago
JSON representation
zsh plugins for working with git worktree
- Host: GitHub
- URL: https://github.com/jspears/worktree
- Owner: jspears
- License: mit
- Created: 2021-05-28T19:31:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-23T17:45:43.000Z (over 4 years ago)
- Last Synced: 2025-07-07T20:53:17.099Z (5 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - worktree - Adds functions that wrap `git worktree`. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - worktree - Adds functions that wrap `git worktree`. (Plugins / ZSH on Windows)
README
# worktree
zsh plugins for working with git worktree
## Usage
###Install the plugin
`zsh
(cd $ZSH_CUSTOM; git clone git@github.com:jspears/worktree.git)
`
### Activate the plugin
Edit .zshrc
find the `plugins` variable
add 'worktree' to the list
```zsh
plugins=(worktree zsh-nvm git npm )
```
### Configuration
There are 2 ENV variables to configure
- `WORKTREE_CODE_DIR ` - what directory to look for projects
- `WORKTERE_CODE_EDITOR` - what to use as an IDE. If unset it will not prompt to open IDE in new worktree
- `WORKTREE_POST_SWITCH` - A command to run after switchin (maybe npm install?)
- `WORKTREE_POST_CREATE` - A command to run after creating a new worktree.
## Dependencies
A relatively modern version of git and oh-my-zsh