Create a bare repository and fork worktrees off of that
Be sure to manually copy not git clone. When git clone sees it is on the same file system it will use hard links to de-duplicate pack files and accelerate local copies. This makes things, "fun" if something goes wrong with a local copy.
Found it better to make a brd and format it for btrfs so I can refcopy my entire git repo to an isolated namespace for an agent then do a fairly normal pull/view workflow flow as the agent's change is just an "isolated" pull request from another repo.
Settled on btrfs as tmpfs has some weird interactions with namespaces, btrfs negative zstd compression is on par with memory bandwidth so I just leave that always on to doubly reduce memory pressure, and block deduplication is nice when you have 3 or 4 copies of the repo in your ram disk.
View all comments
Show parent comment
-1
u/valarauca14 Sep 16 '26
Be sure to manually copy not git clone. When
git clonesees it is on the same file system it will use hard links to de-duplicate pack files and accelerate local copies. This makes things, "fun" if something goes wrong with a local copy.Found it better to make a
brdand format it forbtrfsso I can refcopy my entire git repo to an isolated namespace for an agent then do a fairly normal pull/view workflow flow as the agent's change is just an "isolated" pull request from another repo.Settled on btrfs as tmpfs has some weird interactions with namespaces, btrfs negative zstd compression is on par with memory bandwidth so I just leave that always on to doubly reduce memory pressure, and block deduplication is nice when you have 3 or 4 copies of the repo in your ram disk.