I started using Github to host most of my code, including my Matlab code. It turns out that Github syntax emphasizes code based on its extension, not the contents of the file. This is not so good for Matlab m files. They are recognized as Objective-C files, also .m, and are incorrectly identified / allocated. Github highlights Matlab m files if they have a .matlab extension, but the problem is that Matlab seems to refuse to run files that don't have a .m extension. I could not come up with a solution because I would like my Matlab files to play well with Github and Matlab. So here are a couple of questions:
Is there a way for all .m files to be converted to .matlab extensions when clicked on Github? Will it also need to convert .matlab files to .m extensions when extracting or cloning from Github?
If 1. is not possible, is there a way to get Matlab to run files with the .matlab extension?
If yes or 1 or 2, I would like some tips or examples on how to do this.
git hooks, 1 . .git/hooks/, , ( ). , , post-receive, .m .matlab github, - (, ), .m.
.git/hooks/
.m
.matlab
, git hooks SO: 1, 2, 3, 4, ...
, , , , .
, Github . , *.m .
LF matlab eol = LF ( Windows) git-crlf-conversion-for-m-matlab-files