Let’s say you’ve created an awesome MATLAB file, and you want the world to know about it. So you go to the File Exchange page and click on the big blue button that says “Submit a File”. In the past, you’d see a page that asks you to submit a ZIP-file to be uploaded. But something has changed. Now you have options. What are they?
We’ve added a direct connection between File Exchange and GitHub. In practice, this means that if your code already lives on GitHub, you can leave it there. The File Exchange is now smart enough to distribute the code directly from GitHub to anyone who asks for it from MATLAB Central. You get all the benefits of collaborative development in GitHub while community members get access to the latest version of your projects. No need to maintain the files in two different locations. Push your changes up to GitHub, and seconds later that’s what gets served from the File Exchange.
We’re very excited about this feature, because we know there are already a lot of excellent MATLAB-related repos on GitHub. With this feature, we join two strong communities and open a new era on MATLAB Central.
Comments are closed.
10 CommentsOldest to Newest
Well done. A good step towards a truly valuable goal (of “trusted” libraries that the user can choose to keep up-to-date when the author updates).
As that goal gets nearer all the security aspects of having an author basically push code to lots of different machines will come up… but that already exists with phone app updates so there’s at least a precedent MATLAB could work on.
Trying to add: https://github.com/newfolder/PRT to the file exchange. It seems the file exchange wants “newfolder/PRT” as the link. At least that enables me to click “OK”, but now I get:
"Internal Server Error - Read The server encountered an internal error or misconfiguration and was unable to complete your request. Reference #3.c823fea5.1398094405.7cb49ca"
Which seems cryptic. I’ve confirmed the GitHub repository is still working.
An excellent idea! I’ve just put two of my submissions into GitHub. Hopefully this will improve collaboration and mean speedier bug fixes.
The error above –
... Reference #3.c823fea5.1398094405.7cb49ca"
Was resolved (for me) when I switched from using Chrome to using IE or FireFox. Might have been a Chrome extension or other browser-related problem. Every thing works fine now. Thanks for this great addition to the file exchange!
Can I link to a github gist? (e.g., https://gist.github.com/cmacminn/8a111b9c7e7033d01ad9)
If so, I couldn’t figure out how… the URLs don’t work the same way.
No, sorry. This feature doesn’t support gists. Looks like you’ve got some cool functionality there in the gist. Maybe you’d consider promoting it to a full repo and submitting it?
Hi Ned – I could do that, but there’s so much more overhead involved in a full repository: Need to install git and learn how to use it, then create a repository, then make a local clone… Seems like overkill when I just want to upload a single file. gist is so clean and simple.
I notice that files linked from Github provide a link to the repository and say to look there for license information. Does this we can link our GPLed code from Github and have it available via the File Exchange without relicensing under the BSD license?
Hi Cameron: Yes, that’s correct. We provide a link as a courtesy, but don’t make any assertions or demands regarding the license.
How do you upload one .m file via github instead of uploading a complete folder / repository?