logoalt Hacker News

8cvor6j844qw_d6yesterday at 6:14 PM3 repliesview on HN

I prefer gitignore since it survives dev container rebuilds.

I can set a creation script or volume to restore/persist configs if I must avoid gitignore. However, that's an extra script or devcontainer mounts config over a gitignore line.


Replies

mvanbaakyesterday at 6:36 PM

In my opinion (which might not be shared by everyone) this is a you problem. Developers in the team not using decontainers should not have to worry about your environment. ide/local-env stuff should be ignored in the users git setup, everything that the repo creates (build artifacts, environment files etc) should be in the repo.

arcanemachineryesterday at 7:08 PM

Interesting case. For the global ignore file, couldn't you just bind-mount that into the container?

show 1 reply
paulddraperyesterday at 7:17 PM

That's an interesting case, where you are crossing operating systems.

---

That said, the easier change is still a one/two line bind mount that trying to exhaustively list ignored directories for every IDE or tool under the sun.