The MM repo has a git configuration to only track the “default” folder in the MM/modules folder. This is cool because you can have a separate git repository inside another! When you like a module someone (even yourself) created on github, you need to install it in the MM/modules folder. For example, from the MagicMirror/modules directory, I’m cloning a repo:
[MagicMirror/modules]> git clone https://github.com/sdetweil/MyCovid19.git
You’ll see that a new directory is created under the “modules” directory – and it’s the same name as the git repository. Important to this discussion; the MagicMirror repo doesn’t care about this new directory! You follow the usual steps to update MM with no git side-effects … and … you can update the new module directory that you cloned using the same “git pull” process!
Side note: there are often a few more steps needed to install a module. In this example, @sdetweil follows best practice to include installation instructions in the module README.
So, in a general case, you can create a repo, for example, “MyStuff” in the MM/modules folder. It can contain anything and you can manage it (edit files/push/pull/branch/etc.) all within the “MM/modules/MyStuff” directory.
Just don’t call your repository “default”!
fyi - Git keeps track of files/directories to ignore within a repository by using a .gitignore file located in the repo’s root folder. Check out all the files the MagicMirror ignores!