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.

Dubious ownership just means that the current user and the owner of the files are different. Since your NAS setup handles the local copying of the files, it wouldn’t surprise me if the NAS owns the files. So dubious ownership makes sense in that case. If you stick with NAS syncing I’d say just set up a safe directory and move on with your life.


Personally, I wouldn’t use the NAS to sync files automatically. Git is built to have multiple independent checkouts that communicate with each other only when you tell them to with commands like push, pull, and fetch. It is OK and expected that you have multiple copies of your repo.

The way I’d handle your setup would be to treat the NAS like Github: A central repository that you can make independent checkouts from. (A quick google search suggests its possible to do over ssh, but I don’t know the details)

So you have your central NAS repository, you checkout your project from there on your local drive and do work, then push your changes to the NAS. Then your projects in your maya path directories are separate git checkouts (it’s completely OK to have git checkouts here), and you’d just pull the latest changes from your NAS whenever you want.


For my own projects, I just use github. I could set them to private if I cared, but I don’t. I can access them from anywhere, and a big company is gonna handle data integrity better than I could.

And the different versions are handled by git tags. You just tag a revision with something like “v1.0.1” or “v0.3.2-dev” and then you can make rules based on those tag names.

So you could write a script like “Pull the latest changes, then check out the latest semantic version tag that’s not labeled as development”

1 Like

Thank you so much. Gave me a lot to think about.
I’m just ambivalent about how to organize and structure my data.
And yes, makes little sense to use the NAS as an intermediary step as it is now. Makes no sense.
The repo is on GitHub so I should just pull it locally.

But do I put everything on GitHub now or just the things that are in active development or collaborations? The way I’m thinking about it is that I will end up with my development projects spread over several locations that I need to remember where to find what. On the NAS as well as in GitHub, but maybe I’m making this a much bigger issue than it is. I’m just trying to stay organized.

A script that checks if an update to some scripts are available would be cool yes.

Each git repo keeps track of where it was cloned from.
It stores this information automatically under the name “origin”.
So at the end of a work session, you can just git push origin to upload your committed changes to the repo you cloned from. (You can always update that where origin points if you need to)

What I’m getting at is: It doesn’t HAVE to be github since each repo keeps track of where its own origin is. All you need is some central location that you can access. It’s just that github is really convenient, so I’d suggest just using github for now, and expanding from there if you need to.

And then just keep the number of central locations small, and push your changes back to origin. Then you can have a bajillion working clones all over the place, and it won’t matter. Just pull the latest from origin, and start working!

2 Likes

Hi, and thank you. Been a few busy days. Appreciate it!
Much clearer now.