ExtJS Git Submodule
I know it’s been a while since I last posted about ExtJS… things have been quite busy at work and I’ve forced myself to take a sabbatical from the project that has me working with ExtJS everyday. I’ll get back to it soon, don’t worry, and I have lots of topics in the queue. In the meantime, I have a bit of a public service announcement for those who use ExtJS with git.
If you’re not familiar with git as a version control system, I encourage you to check it out. I came from Subversion, which was great… but, at least for me, git is better. Better yet, if you use git with open source projects, you can use github.com for free to host your code, which is pretty cool, and self-hosting isn’t very challenging either. One of the aspects of git I’m just coming to understand is git-submodule. The idea is that there is an external project you’d like to pull into your project, but instead of committing it to your own repository, you want to use the external project’s repository. Lots of reasons to want to do this, such as making it easier to track upstream changes, or reducing the size of your own repository.
Ever since I learned about git submodules, I’ve thought that ExtJS seemed like a perfect candidate. As there is a mechanism to change the library at runtime without changing the code on the file system, there’s very little reason to have the library in your own repository. On top of which, ExtJS is big, so why waste the space. Sadly, the fine folks at extjs.com do not provide ExtJS in git form. There is a subversion repository for commercial clients (of which my employer is) but subversion is not git.
Thus, I have decided to take matters into my own hands. As ExtJS is licensed under the GPL, I have the legal right to redistribute the code. So I created my own git repository just for ExtJS at github which anyone can use as to add ExtJS as a git submodule. I’m still trying to figure out some aspects of git-submodule… like, is it possible to specify a tag from the external repo? If so, I will start adding tags to the repository as new versions are released.
For those who want to jump right into using the repo, here’s the magical incantation you want to run from your project root (change the “public/extjs” part to the relative path you want to install ExtJS at):
git submodule add git://github.com/probonogeek/extjs.git public/extjs git submodule init git submodule update
Lastly, if there are any extjs.com folks reading this who object to what I’ve done, please don’t hesitate to contact me. While the GPL gives me permission to do as I’ve done, there is a big difference between legal right and community consent. Right now I’m operating on a sort of tacit consent, but will take the repository down if requested.