Hello, my name is Ren Provey.
I am a full stack web software developer with a deep interest
in iOS, user experience and
analytics.

Git Submodule

$ git submodule — List your submodules, a - before the hash indicates the submodule is not initialized
$ git submodule add <git repository> <target directory> — Let your project know about the submodule and where it will go
$ git submodule init <target directory> — Initialize the submodule (this will add an entry to your .git/config file)
$ git submodule update <target directory> — Pull in the contents of the submodule. This command is destructive.

The trick here is that a Git Submodule only tracks the revision from when it was added, not the latest version of whatever that submodule contains. To update a submodule:

$ cd <target directory>
$ git checkout HEAD — The can be any revision, not necessarily HEAD.
$ git add <target directory>
$ git commit -m "UPDATED: Submodule..."

Notes

960.gs Series

HTML5 Series

Jekyll Series

Git Series

Around the Web

Twitter: @renprovey
LinkedIn: Ren Provey
GitHub: ren
Work: CityBits, the guide to all the bits of your trip that you'll rave about to your friends.

Places worth visiting

David Eisinger
Memorly