Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does any Version Control System like SVN, Git, or Mercurial let you "keep latest version" but not the revisions? (such as for binary files)

In our project files, if there are binary files, such as .doc, .xls, .jpg, and we choose to not keep their past revisions (just keeping a latest version is ok), is there a way to tell SVN, Git, or Mercurial or some other tool to skip the revisions for these files or for a particular folder?

Say, there is a 4MB .doc file that I need to check in hundred of times, but I don't really care so much about its past versions. So if the system keeps 100 revisions of it, that's already 400MB... checking in 300 times means 1.2GB for 1 file and that's not good. Only the latest version is good so that everybody can sync to it. Also I don't want other people check out the project and have to check out 20GB of stuff. (will Git and Mercurial keep all revision in each person's local repository?)

like image 471
nonopolarity Avatar asked Jun 14 '10 13:06

nonopolarity


2 Answers

I do know one that does this, but you're not going to like the answer.

Its Visual Sourcesafe. Check the flag 'store only latest version' on a file and it stops keeping history.

If you want this feature with a decent SCM, I would recommend not putting the file in the SCM at all, but store it elsewhere like a document management solution, or even just a filesystem share.

like image 129
gbjbaanb Avatar answered Sep 28 '22 09:09

gbjbaanb


In general, no: a VCS is intended to keep the entire history. However, all is not lost on the space front; all the systems you named will store binary diffs for each revision, not a complete copy of the entire file. This means that the space required will often be much less.

like image 40
Andrew Aylett Avatar answered Sep 28 '22 09:09

Andrew Aylett