←back to thread

159 points jbredeche | 1 comments | | HN request time: 0.203s | source
Show context
CBLT ◴[] No.45484252[source]
Git worktrees are global mutable state; all containers on your laptop are contending on the same git database. This has a couple of rough edges, but you can work around it.

I prefer instead to make shallow checkouts for my LXC containers, then my main repo can just pull from those. This works just like you expect, without weird worktree issues. The container here is actually providing a security boundary. With a worktree, you need to mount the main repo's .git directory; a malicious process could easily install a git hook to escape.

replies(2): >>45531310 #>>45533758 #
1. chrisweekly ◴[] No.45531310[source]
good point