Did you know?

Submodules with git

Just recently a was working on a presentation for a event that my boss organizes. I stumbled across a nice thing you can do with Git.

The presentation is created in Reveal.js the aspect that i like about it that you can treat your presentation as code. Still working on the subject to do it with AsciiDoc. On the latter; The documentation says it should be easy but I do not have enough control on the output. Nice project for the coming winter.

But this is not the subject, its “Did you know”.

What?

To work with Reveal.js you need a copy of the source code to run it locally. I do not want the source code of Reveal.js copied into my repo.

Actually it is quite simple to do. Git has something called submodules. This option allows you to create a symbolic link like construction in your repository.

How

For a full detailed explanation go to the documentation of Git it self.

The gist below is the simplest form you can get for it. It creates a link to my Builder annotations repository.

An other document that provides a nice read on this subject can be found at http://git-scm.com/book/en/v2/Git-Tools-Submodules