Read the statement by Michael Teeuw here.
Backing up via GitHub repo
-
@karsten13 Git supports nested repositories. No need to create a higher level repo and then ignore the MagicMirror. There’s already a line in the MagicMirror/.gitignore
# Ignore all modules except the default modules. /modules/**
So anything can be created in the MagicMirror/modules directory – and it is ignored by the MM repo.
-
My answer is related to
I was wondering how I could backup my config and modules folder to a private repository on GitHub
.So if you want to put
config
andmodules
in one git repo without the other MagicMirror stuff, if found no other solution as doing it with such a “parent” construction as described … -
@karsten13 You are correct that a parent /mm/ repository could nicely include the MagicMirror/config/config.js file while excluding the ‘core’ MagicMirror! :clapping_hands_medium-light_skin_tone:
Minor thoughts:
- Using your suggested command in that parent /mm/ repository,
… will include the modules/default/ directory.git add -f MagicMirror/modules/*
Since it is included by the MagicMirror repository. I suggest only adding the specific paths to any modules you have edited. - also add the .gitignore to the parent /mm/ repository.
- Using your suggested command in that parent /mm/ repository,
-
:thumbs_up:
-
Here’s what I’ve done.
Everything I modify, including instructions for things that can’t be moved is stored in a “MyConfigs” directory on my harddrive, with symlinks in the original folder - so config.js and custom.css is actually symlinks in the magicmirror folders.
Modifications to modules that I do are all forked off the original and stored independently.
It took me literally 5 minutes to get config up again after a SD Card blowout…
Pros: no work to get unmodified modules and MagicMirror up to current.
Cons: remembering the dang symlink command. I’m gonna write a script.
-
Thanks all for your responses! I am going to try @karsten13’s answer and setup a parent repository above the MagicMirror directory! Funny how I did not thank of that :D