How do you manage version control across different types of projects?

I work on a lot of projects, and I’m trying to find ways to improve how I organize my repo structures. Curious to know how others handle it in different contexts.

Here’s a bit about my setup:

  1. Academic projects: These are the simplest. I usually set up one repo per paper, along with some infrastructure projects (like packages and datasets) that are kept in separate repos.

  2. Consulting: This one’s trickier since it’s often a side project with various components. A typical project includes datasets, code prototypes (mostly Python and R), exploratory work (notebooks), deliverables (like notebooks or quarto docs), plus meeting notes, timesheets, and other internal documents. Some projects span multiple years and involve several devcontainer setups, occasionally with newer package versions over time.

I’ve been using smaller repos, but it gets challenging to manage them all and keep track of where things are. I know some folks use monorepos, though I haven’t tried that approach yet.

For context, I work mainly in VS Code and devcontainers, which helps with portability across computers.

You might want to check out git submodules in addition to regular git repos. It’s a useful feature for organizing multiple related repositories.

Have you considered using Nix with git? I’m still in university, but Nix helps a lot with dependency management and might help you avoid version conflicts in larger repos.