Hacker News new | ask | show | jobs
by vaibhavsagar 832 days ago
Why not `git clone --bare`?
2 comments

I've tried this and it seems to be working fine.

git clone --bare https://path.to/repo.git

mv repo.git .git

now we can create worktrees in the same folder.

fwiw you can actually one line that

> git clone --bare https://path.to/repo.git .git

You can bare clone and it works fine. This is in part just habit from converting existing repos into bare + worktree repos.