简体   繁体   中英

How can I have Subversion keep only the latest version of a file?

I have a large file in my repository that is not text-mergeable and that I do not need multiple-version control for (PPT for example). I would like to keep it on the repository for backup purposes and to share with multiple people, but I do not want the repository size to grow huge because it's keeping a duplicate copy of the file every time it changes. Is there a way to specify this behavior for a file in a Subversion repository?

Thanks!

This is not possible in Subversion. However: subversion keeps the changes to this file as binary diffs in the repository, so depending on the type of changes you make it won't consume a lot of extra space.

You can't. Subversion is designed to keep the different versions of files. It's a version control system, after all.

Maybe just don't put it in subversion, but back it up or share it using rsync instead.

You can't - and rightly so.

If a file doesn't change then only one version is stored. If a file does change then surely the point of using version control of any form is so that you can retrieve and earlier version. It may seem now that you would never want to do this, but the chances are that at some point in the future you will want to retrieve it.

If space is a problem get a bigger disk or upgrade your plan. It will be worth it in the long run.

另一种方法是存储符号链接,然后将文件托管在网络共享上。

你可能正在使用错误的工具来完成工作。

I can't believe I'm saying it, but MS Visual Source Safe has this functionality. However, I would not recommend using MS-VSS it due to too many reasons. Main two are instability issues and since it is virtually impossible to use branching (officially this option exists, but practically, it does not work well).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM