I’ve probably known of the existence of HTML5 Boilerplate since Paul Irish first started working on it. I don’t remember exactly what I thought of it when I was first introduced to it, but I don’t recall being particularly impressed.
Well last night I took another look–and I’m glad I did. At this point HTML5 Boilerplate has basically codified all of the best practices for web development into a nice, friendly, easy-to-use package. And, to top it all off, it has a build system that generates everything to handle improved caching (really, the most ornery part of the whole process). You can be certain that this (or my own fork of it) will be my starting point for all future projects.
Anyway, the point of this post is to share a quick Git recipe for getting started on your new project using HTML5 Boilerplate. Picking up from having created a repo for your project on Github:
git clone git://github.com/h5bp/html5-boilerplate.git __REPONAME__
git branch -m h5bp
git checkout -b master
git remote rename origin h5bp
git remote add origin firstname.lastname@example.org:__USERNAME__/__REPONAME__.git
git push -u origin master
At this point you’re set up to track changes in the HTML5 Boilerplate repository and easily “git merge” them into into your own repository.
Working With A Team
Now let’s say you’re working with a team. Since you’re merging all things into your own repo’s “origin/master” not everybody has to maintain the reference to the HTML5 Boilerplate repository for everything to “just work.” But what if you have two front-end developers who are really on top of watching changes to HTML5 Boilerplate? I’ll leave it as an exercise for the reader, but it is the same basic process.