Skip to content
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

Update README to use a hidden bare repo #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cryptomilk
Copy link

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

This hides the bare repo files in a `.bare` repository.
@ThePrimeagen
Copy link
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
Owner

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

@cryptomilk
Copy link
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

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
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
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

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