Update README to use a hidden bare repo
This hides the bare repo files in a .bare repository.
interesting approach. I may not use it myself, but I do like it.
I am unsure how it will work with the plugin though. We do need to be in the git root to run. This would put you in a folder that is not quite the git root.
have you tested this yourself? I'll do some testing in a bit.
I'm using it with Samba ...
We also updated our scripts so it works with worktrees ... https://gitlab.com/samba-team/samba/-/commit/8858cf72af1cc15784749e58f184559a839dd4ef
I tested this and it almost works, but I will stick to what is currently in the README.
This PR:
- It does work fine if you use commands within a branch folder
- It doesn't work if you use it in the root (where
.barefolder is located):
Vim(lua):E5108: Error executing lua /Users/me/.vim/plugged/plenary.nvim/lua/plenary/path.lua:179: attempt to index local 'self' (a nil value)
I do like to have git files hidden and not mixed with branches.
Also - Thanks for the plugin & youtube video(s), good stuff.
I just switched to using a .bare directory, working a fix to make it work. this in my opinion is the best way to use worktrees since all the folders in the folder are your worktrees (you do not see all the git specific stuff).
Once I get it working this PR should be changed so that both ways are presented
I would like to see the README updated to show both ways of generating a bare repo and not just replacing what is there
Do we need the .bare directory ?
Tested with the following, and it seemed to be working well with this plugin
git clone https://github.com/ThePrimeagen/git-worktree.nvim --bare git-worktree.nvim/.git