Feature Request: Add git worktree switcher like gcb
Check list
- [x] I have read through the README
- [x] I have the latest version of forgit
- [x] I have searched through the existing issues
Environment info
- OS
- [ ] Linux
- [x] Mac OS X
- [ ] Windows
- [ ] Others:
- Shell
- [ ] bash
- [x] zsh
- [ ] fish
Feature Request:
Add a work tree switcher like gcb , leveraging fzf.
Thanks for your idea. I am not sure how the interface is supposed to look like. In forgit we only have wrappers for existing git functionality up to now, and there is no git worktree switch command or anything similar. Can you describe how your usecase looks like and what exactly you would like to achieve? Is it only about cding into a different work tree?
@deekshithanand what do you think of the following abbreviations?
All Possible Worktree Operations (https://git-scm.com/docs/git-worktree):
-
git worktree add -
git worktree list-
cd+ interactive asgwj(git worktree jump- not a native git operation)
-
-
git worktree lock- interactive as
gwl
- interactive as
-
git worktree move -
git worktree prune -
git worktree remove- interactive as
gwr
- interactive as
-
git worktree repair -
git worktree unlock- interactive as
gwu
- interactive as
I have only implemented gwj, gwl, gwr, and gwu in #402.
Awesome!
Right now gcb shows worktrees, but fails to switch to them
@iloveitaly Can you post a screenshot of what you get when you run git worktree list in the same repo as the gif above?
gcb still give me the worktrees in the list