Git – Should Font Assets Be Kept in Git Repo?

gitrepositorysvn

Switched from svn to git, and I can feel that several repos with heavy assets feel, well, heavy.

I never noticed this heaviness with svn. There is a huge difference when checking out whole history of mostly static assets vs just head.

That got me into optimization. And I'm trying to lean repos up, removing all what is content.

I've cleaned up mostly everything, but fonts.

I wonder if fonts should be kept in the git repo, many of my repos actually contain same fonts.

My thinking is to make a private font server, fonts.company.com use that as a CDN and remove all font-assets from repos.

What is your take on this?

I keep laravel / wordpress / ci / ror web projects under git.

Best Answer

Commit until proven guilty.

My preference is to keep everything that's needed in the repo unless there is a strong argument against having it there.

Even if the version control aspect of the repository is not really needed for a given asset, having it come packaged with everything else when a developer clones the repo, or when the repo is deployed to a remote server, confers an advantage that housing those files elsewhere does not.

Putting all the files in the repo eliminates extra provisioning steps when attempting to get the project up and running on a new host.

Related Topic