Re:Mounting Git commits as folders with NFS
by masklinn on Tuesday December 05, 2023 @05:19AM
(#38529051)
Worktrees require checking out each branch individually.
And they’re something of a pain in the ass to manage as you can’t have two worktrees to the same branch.
So for temporary querying across a few branches doing clones is a lot easier (git will hardlink when cloning on the same FS so performances are not an issue, and you can just delete the scratch clones afterwards without the need to prune the worktrees), and if you regularly need to query things across a lot of branches worktrees are unusable.
And they’re something of a pain in the ass to manage as you can’t have two worktrees to the same branch.
So for temporary querying across a few branches doing clones is a lot easier (git will hardlink when cloning on the same FS so performances are not an issue, and you can just delete the scratch clones afterwards without the need to prune the worktrees), and if you regularly need to query things across a lot of branches worktrees are unusable.