I rencently came accross the worktree concept in git. I find it quite interesting since in my company we have very large .git repo. The thing is that most of the employee tend to have a lot of clones from the repo, and it takes a lot of space on the cluster.
I've tried to use worktree for a few days now and I've setup it as follow :
I have on git parent, let's call it clone0 and then I have N worktree that inherit this clone0, so let's say clone1 and clone2. The good thing is that all the metadata from the .git are now shared accross clone1 and clone2, allowing me to save several gigas of data since they don't have a copy of .git/objects. For now it's working super fine and I haven't encounter any issue but I was wondering it is was the best way of doing or if there could be some counterpart. Btw we are using git 2.39 Thanks