WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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