Working with submodules
Git Submodules are actually pretty great. Here’s a simple way to manage submodule development from within an open source project.
Say there’s an Awesome Framework, and you want to write an open source plugin for it.
First create the plugin.
$ git init my-fantastic-plugin
Next clone the framework.
$ git clone defunkt/my-awesome-framework $ cd my-awesome-framework
Now add your plugin as a submodule to the framework.
$ git submodule add git://github.com/defunkt/my-fantastic-plugin.git plugins/my-fantastic-plugin
Next cd into the plugin and add your private URL as a remote.
$ cd plugins/my-fantastic-plugin $ git remote add push git@github.com:defunkt/my-fantastic-plugin.git
And that’s it. Make changes from within my-awesome-framework/plugins/my-fantastic-plugin and, when you’re ready, just git push push master.
Best of all: people cloning your my-awesome-framework fork will have no problem pulling down your my-fantastic-plugin submodule, as you’ve registered the public clone URL for the submodule. The commands
$ git submodule init $ git submodule update
Will pull the submodules into the current repository.
This is how I develop textmate.el from within my Emacs config while keeping the submodule URL public.

Check out my-awesome-framework to see this Guide’s example in action.