Skip to content

Update README to use a hidden bare repo#46

Open
cryptomilk wants to merge 1 commit intoThePrimeagen:masterfrom
cryptomilk:cryptomilk-hidden-bare-repo
Open

Update README to use a hidden bare repo#46
cryptomilk wants to merge 1 commit intoThePrimeagen:masterfrom
cryptomilk:cryptomilk-hidden-bare-repo

Conversation

@cryptomilk
Copy link
Copy Markdown

This hides the bare repo files in a .bare repository.

This hides the bare repo files in a `.bare` repository.
@ThePrimeagen
Copy link
Copy Markdown
Owner

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.

@ThePrimeagen
Copy link
Copy Markdown
Owner

have you tested this yourself? I'll do some testing in a bit.

@cryptomilk
Copy link
Copy Markdown
Author

I'm using it with Samba ...

We also updated our scripts so it works with worktrees ... https://gitlab.com/samba-team/samba/-/commit/8858cf72af1cc15784749e58f184559a839dd4ef

@meznaric
Copy link
Copy Markdown

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 .bare folder 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.

@polarmutex
Copy link
Copy Markdown
Collaborator

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

@polarmutex
Copy link
Copy Markdown
Collaborator

I would like to see the README updated to show both ways of generating a bare repo and not just replacing what is there

@ANGkeith
Copy link
Copy Markdown

ANGkeith commented Jan 3, 2022

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  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants