-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for .bare
directory
#15
Comments
you pass in a relative path in the worktree create function. So you should be able to create a worktree with '../' when you make it. the worktree create function creates the folder from the gitdir which in your case is the bare repo. I like this feature but there are so many ways people use git and worktrees that I am trying to keep the API simple and let the user interact with the plugin based on their git workflow I do need to keep improving the documentation to showcase use cases or maybe have a wiki with common ones. |
Sounds good, after some more experience, I realized there was no need for the
|
I have a similar setup, that is, a repo cloned bare, but when I pass Being able to pass |
Apologies, I did more testing: it seems that when passing git-worktree.nvim/lua/git-worktree/worktree.lua Lines 94 to 98 in 500629d
|
I also see the same behaviour, but I don't see an exception when trying to use a relative path ("../new-worktree") |
Hello!
I just switched over to using bare repos with git worktrees and I think it's awesome!
I was reading a lot of articles, and I found that it's popular to place all the git related stuff into a
.bare
folder to make a really clean looking directory structure---all the worktrees are front and center without a bunch of noise:where the
.git
folder just contains:However, when I create worktrees with this plugin it places the new worktree into the
.bare
dir instead of with the rest of the worktrees up a level from.bare
. It would be awesome if this plugin could detect the existence of the.bare
dir and move the new worktree up a level!Just for grins, here is a script I found online and adapted to easily clone repos that follow this bare/worktree setup.
`git-clone-bare-for-worktrees`
Thanks!
The text was updated successfully, but these errors were encountered: