Sitemap
Adam Fisher / fisher king (@therightstuff)

Adam Fisher / fisher king (@therightstuff)⁠

Software developer and writer of words, currently producing a graphic novel adaptation of Shakespeare's Sonnets! See http://therightstuff.bio.link for details.

Member-only story

Playing Nicely With Git Worktrees And DevContainers

Working around the “fatal: not a git repository” error

Not a Medium subscriber? Use this link to read this article for free.

Press enter or click to view image in full size
Image generated by Gemini (but not without a fight)

The story

(skip to the solution if you’re in a hurry)

I recently read about git worktrees, and was bothered by the fact that I’ve never come across them before. I might write up my opinions on them in another article (I’m not yet convinced that I need something like tree-me), but right now I’ve managed to get devcontainers working in both my main repository and my worktree repository after a fair amount of effort, so I’m posting this before I move on.

A shout-out to the Markdown-to-Medium crew for enabling me to easily copy my solution here!
(With a couple of tweaks…

--

--

Adam Fisher / fisher king (@therightstuff)
Adam Fisher / fisher king (@therightstuff)

Written by Adam Fisher / fisher king (@therightstuff)⁠

Software developer and writer of words, currently producing a graphic novel adaptation of Shakespeare's Sonnets! See http://therightstuff.bio.link for details.