views:

212

answers:

3

I have a project under version control, but the project has some images, videos and zip files that change every so often. I don't want to store these files under version control because they take up a lot of space and make updates and commits very slow.

What's a good way of dealing with this issue and still commit non-source files that have changed? is there a better way?

I'm currently using subversion, if there is another version control client that is better for dealing with this issue, please recommend it!

+6  A: 

I have lots of non-source files in SVN and the only time it slows down the commit is when I change them. I don't see how this is an issue if they're only changing "every so often". Also the size really shouldn't be a concern. If your repository is on a server and you're worried about how much space it's taking up you need to upgrade. Hard drives are cheap. Buy them.

Some people feel strongly that non-source files don't belong in source control, I say an entire project should be stored in source control. That way if my development system goes down I can switch to another and after a couple minutes of downloading the project I'm back to coding.

Spencer Ruport
+1 for that answer. One addition...from my point of view everything has to be right ordered for Version Control use. If your non Project Files are not structered...leave them outside of version control.
bastianneu
+1  A: 

While I find it a huge pain to deal with non-text files in version control, especially ones that change a lot, I've accepted the practice of "if it is needed for the build/installer it should go in version control". This of course is not a hard rule. I don't keep 3rd party libraries under version control (though know people who do).

I came under this opinion after setting up a Continuous Integration server at my shop. Having everything needed for the build that may change make's it much easier. As previously mentioned I don't keep libs under version control, but that is due to the fact that we rarely upgrade/add new libraries. If this is not the case for your shop then you may consider doing so. Also, if your images/videos/zips change more then once a year then I'd recommend keeping them under version control.

Mark Roddy
The problem I have with this is that I don't care about the version history of those zip/video files, as long as they're the newest ones, there is no problem. That's another reason why I don't want them in version control, it feels like i'm not using version control correctly because it's storing all these different versions when I have no use for them.
Charles Ma
+3  A: 

You added in a comment:

The problem I have with this is that I don't care about the version history of those zip/video files, as long as they're the newest ones, there is no problem.

That means you have a linear workflow of development, only working on the LATEST of one main branch.
You do not seem to deal with the phase "after release", where you have to:

  • maintain what runs in production
  • develop small evolutions...
  • ..while doing massive refactoring for experimenting some big evolutions

In the last three cases, the question of "what were the exact images, videos and zip files "I have to use" or "I was using at the time" might become important.

Anyhow, if you feel SVN do not handle them appropriately, I would still recommend having some way to remember that, for SVN revision xxx to yyy, you were using the version 'z' of your set of binaries.
For that, you could setup an external repository like Maven. See question "Is it acceptable/good to store binaries in SVN?" (my answer in that question is near the top of the page, but I link directly to Evan's answer as he mentions Maven).

VonC
+1, I was going to respond to OP's comment but you nailed it.
Mark Roddy
The question refers to svn but more generally Mercurial has problems with files bigger than 10MB
David Sykes