An opinionated plugin to select or create git worktree's and branches, and then open in a new window within the current tmux session.
The problem was down to being lazy: I didn't want to have to create a new tmux window -> create a worktree -> select or create a branch. I mean why when with one keybinding, two input prompts and it's done.
Add plugin to the list of TPM plugins in your .tmux.conf:
set -g @plugin 'NigelGreenway/tmux-git-workflow'Hit + I to fetch the plugin and source it.
When developing or debugging against this plugin, you can set the verbose flag in your config, reload and see any debug statements to help squash a bug or add a new feature.
When not set, it default's to 0 which is off. To enable, set it to 1.
set -g @git-worktree-verbose 1You can ignore multiple worktrees with the separator |.
set -g @git-worktree-ignore-worktrees ".bare|other-worktree"It is possible to customise the display popup with the keybinding, width and the height.
set -g @git-worktree-keybinding "M-g" # Default is C-g
set -g @git-worktree-popup-width "90" # Default is 80
set -g @@git-worktree-popup-height "20" # Default is 60For safer, isolated development, use Docker to run tests in a containerized Ubuntu environment. This prevents any potential side effects on your host system.
make docker-build
make docker-test
make docker-cleanFor more commands, run make help.
To run the plugin without loading it into tmux all the time, run ./src/git-worktree in the root of the project to trigger the functionality that would run within the TMUX display-popup.
