Read the statement by Michael Teeuw here.
Versioning/maintaining changes?
-
So I’ve modified my Magic Mirror a bit. Within some modules I’ve made some changes to the main files to add functionality or just change the size of font that’s being used. I also added my own calendars to the calendar module. However, whenever I upgrade a module or my whole Magic Mirror it seems these settings are all overwritten. I’m sure there must be a way to only merge new changes or somehow save my changes with git versioning, I just don’t know how-can anyone make some suggestions or point me in the right direction of a tutorial? Thanks!
-
If you’re customising look/feel, then edit custom.css, as that won’t be overwritten by a “git pull”. Also, for some modules you can add config or customisations outside of the modules directory, which will preserve the settings on a pull.
Any changes you make to a modules actual code will get overwritten by an upgrade. You could avoid that if you create your own fork of a module (as some developers here have done).
If upgrading MM itself, then you should always backup your config.js
-
I just realized I was making changes to the master simply in the css file vs the custom one-I’ve moved my custom settings to the custom file and that fixed that. However, I’m still having some issues with individual modules-I guess I’ll have to either write the dev team or create my own fork. If I create my own fork, though, how do I go about merging changes from the master to my fork?
-
You could create a fork and have a branch within this repo referencing the original master branch.
Using git different branches can have different remotes. (https://stackoverflow.com/questions/15775183/git-different-remote-for-each-branch).In this case if the master branch of the original project is updated you can pull these changes and merge them into your own fork’s branch. There could of course be merge conflicts which you would have to resolve.
If you feel you have made changes which more people could benefit of, it would be easier to contact the original developer.