logoalt Hacker News

Normal_gaussiantoday at 12:17 PM1 replyview on HN

The easy way to do this is to create a worktree and then just run it in some form of sandbox - e.g. a Docker container.

In the worktree there is no .git directory, just a .git file which has a single line: "gitdir: <path to gitdir>".

If your sandbox doesn't have access to the gitdir, you're golden.


Replies

gcrtoday at 1:12 PM

What if the sandbox needs access to the history? Imagine asking for help bisecting something, for example

show 2 replies