dgh
dgh

Reputation: 9137

Incorporate HTML5-boilerplate as a Git submodule or is there a better option?

I'm building a Pythonic web application skeleton and I'd ideally like the static files (a small part of the application skeleton) to be based on HTML5-boilerplate since h5bp puts a great deal of effort into cross-browser compliance, etc. Copying the boilerplate doesn't allow me to pull in upstream changes made by h5bp, but html5-boilerplate does not led itself to use as a Git submodule either, unless I decide to place all static files of my app inside html5-boilerplate and treat it as a submodule.

README.md
runserver.py
app_pkg/
  config/
  templates/
  controllers/
  models
  static/       <-- Make this html5-boilerplate submodule? 

Then all my static files go in the html5-boilerplate repo and so html5-boilerplate source code is no longer tracked separately. :(

There are two larger issues here. Git can't nicely handle projects where some source files are my own and other source files track a remote repository (like html5-boilerplate). You CAN have multiple remote repos, but you can't track changes separately. Alternately, source files from other repositories can be included in a project IF they are modular enough to be used as Git submodules. However, html5-boilerplate does not seem to be modular enough for this use case.

How have others managed to incorporate html5-boilerplate into the source of a larger system and rearrange directories while still tracking html5-boilerplate changes separately? There may not be a perfect solution to this problem at the moment, but I want to be sure I'm not missing something brilliant.

Upvotes: 2

Views: 339

Answers (2)

Adam Dymitruk
Adam Dymitruk

Reputation: 129556

You can track softlinks and it might be what you're looking for.

Upvotes: 0

Amber
Amber

Reputation: 526583

One option would be to use git-subtree to do a subtree merge that brings in the h5bp repository into the directory of your choosing. You could then use git-subtree to later merge in upstream changes with minimal effort.

Upvotes: 1

Related Questions