I have started work on an open source theme framework that pulls in lots of great code & resources from elsewhere. For example it uses:

etc etc.

Most of these external projects are hosted on Github or SVN.

Rather than continually download and integrate the latest versions of these other libraries into my framework I am looking for a way to automate this process.

I would be prepared to change the way I work considerably to accomodate an automated work flow that ensures I am always up to date and not always downloading or duplicating files.

Any suggestions are greatly appreciated.


What you're looking for is git submodules:

Git's submodule support allows a repository to contain, as a subdirectory, a checkout of an external project.

PS: Always try to use the jQuery bundled with WordPress.


Well use git.

With git you can fork or clone projects or blobs which keeps them tied into the original.

For example clone jquery onto you local dev folder where you want it:

// this will default to master origin
// should be cloned into a project sub-directory like /js
$ git clone git://github.com/jquery/jquery.git /js

//add the remote upstream
 git remote add upstream  git://github.com/jquery/jquery.git

// fetch changes from parent jquery and merge them with yours
 git fetch upstream
 git merge upstream/master

This is a simple example but git takes seconds to push/pull and merge large amounts of data around, and you can move into more advanced stuff like git sub-modules.

Make sure you use the proper folder structure and it's best (unless your using sub-modules) to have one repo to be pulling data into, git does not work very well with nested repo's.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.