git setup/usage question
Bakul Shah
bakul at iitbombay.org
Thu Jan 28 11:34:24 UTC 2021
You might want to read this as to why bare repos are a problem with worktrees & some solutions.
https://stackoverflow.com/questions/54367011/git-bare-repositories-worktrees-and-tracking-branches
I wish I had read this earlier. Torek’s solution is quite clever. Basically
git clone $url
cd $new-repo
git checkout $(git commit-tree $(git hash-object -t tree /dev/null) < /dev/null)
This makes the new repo completely empty but you can add multiple worktrees, no more than one per branch, for any local work.
More information about the freebsd-git
mailing list