How do you structure Git projects when your files live on a NAS? (Maya scripts, dev vs. published copies)

Hi all,

I’ve been scripting for a long time but I’m new to Git, and I’m trying to figure out how to organize my work around it.

My current setup
Everything lives on my Synology NAS, connected over ethernet. For larger projects I need locally, I use Synology Drive (similar to Dropbox) to “check out” a folder, so I work locally and saves sync back to the NAS. My dev projects look like this:

U:\Projects\dev\00_java\print_app
U:\Projects\dev\10_arduino\colorMixing
U:\Projects\dev\python\MAYA_project_setup
U:\Projects\dev\python\MAYA_Workflow_Tools

I open these directly from the NAS in Wing IDE. No version control so far.

Where Git gets confusing
If I open a repo from the NAS, Git throws an ownership error (“dubious ownership”). I know there are workarounds, but I’m not sure that’s the right approach.
If I use Synology Drive to sync a repo folder, the .git data doesn’t seem to reach the NAS.
My understanding is that the repo on GitHub (or another host) is the “base” and you clone it to your computer to work on it. So is your whole codebase stored on the online platform, or do you keep the master copy locally and use the platform as a backup/sync point?

The Maya side
My scripts live in one big library synced by Synology Drive, and Maya finds everything through Maya.env (MAYA_MODULE_PATH, MAYA_SCRIPT_PATH, etc.). Right now I copy the finished files from my dev folder into the library by hand (e.g. into 13_MODULES_PACK\workflowtools), so the dev copy and the used copy aren’t connected.

I’m unsure whether a Git repo belongs inside that library. If I branch and check things out while Maya is loading the same folder, the tool could be half-finished or fail to load whenever the files change.

My questions
Where do you keep your repos: locally, on a NAS, or both? How do you back them up?
How do you handle a “dev” version vs. a “published” version that Maya (or any app) actually loads? Two clones of the same repo? A deploy script? Something else?
Is it a bad idea to put a Git repo inside a Synology Drive / Dropbox-synced folder?
Is there a better way to organize a folder structure like the one above, now that I’m adding Git?

Thanks for any advice, even a short description of your own workflow would help a lot.