I've started using Github for hosting much of my code, including my Matlab code. It turns out that Github syntax highlights code based on its extension rather than the content of the file. This is not so great for Matlab m files. They get recognized as Objective-C files, also .m, and improperly identified/highlighted. Github does highlight Matlab m files if they have the .matlab extension, but the problem with this is that Matlab seems to refuse to run files that that don't have the .m extension. I haven't been able to come up with a solution, as I'd like my matlab files to play nicely with both Github and Matlab. So here are couple of questions:
Is there a way to have all .m files converted to .matlab extensions when pushed to Github? This would also need to convert .matlab files to .m extensions when fetching or cloning from Github?
If 1. isn't possible, is there a way to get Matlab to run files that have a .matlab extension?
If yes to either 1 or 2, I'd love some tips or examples of how to do this.