How about cp --reflink? Supported by btrfs, bcachefs and zfs. It's quite not as fast as subvolumes in btrfs, but it should be plenty fast.
This should actually be a feature for git itself, if it's not already.
This should actually be a feature for git itself, if it's not already.
Buy yeah, this should be equivalent in most cases, since I can't imagine that many Git repos have enough files for the difference to be noticeable.
echo 2 | sudo tee /proc/sys/vm/drop_caches
time cp -rl foo bar
took 2.6 seconds for 273000 files, so I think it's highly manageable. Reflinking might be a bit slower than hardlinking, though.