4

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.

5

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.

  • There would be no extra step, imagine google fonts. – user49346 Feb 10 '15 at 21:45
  • 1
    @SandroDzneladze: Would you be willing to bet your salary on the font CDN being well reachable in all locations where the projects get deployed? – Bart van Ingen Schenau Feb 11 '15 at 8:19
  • That's a good point. – user49346 Feb 11 '15 at 8:38
0

Given the relative size of fonts, it's hard to imagine this making an appreciable difference on the performance of a repo. Compare that to having to remember to check the fonts repo for an updated version of the font (or new fonts that are needed), and it seems like it wouldn't be worth the hassle. However, YMMV.

  • Well honestly, fonts mostly never change. And if they change we need them changed everywhere. Since I also moved all my vendor js / css to bower and only keep bower.json file in repo, it would be cool to have similar thing for fonts. – user49346 Feb 10 '15 at 20:52
  • Let me ask you this: will all of your repo's users always know in a situation whether or not they have to get a new font? If so, then having their own repo probably makes sense in your scenario. – Locke Feb 10 '15 at 20:58
  • Repo users wouldn't need to know anything, much like google fonts user. – user49346 Feb 10 '15 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy