开发者

Force git or svn or other VCS to save only last version of a file?

I have the same problem as this guy How do I manage built files in different branches?. And as far as I understand this problem the solution should be to force git not to store whole history for some sort of files. If it could be able not to ignore built binaries but store it in a branch, this will solve the problem. But this binaries shouldn't be tracked as a normal sources. Each this binary should be only "stored" in a branch, only the very last version of it and without any history of previous deleted or modified versions.

Now git-stash have switch "save --all" but stash isn't a per branch store, it couln开发者_如何转开发't be used as a permanent store for precompiled binaries in every branch. Yes? Any other ideas?

Also I wonder is it possible to do such trick in svn or may be in any other version control system? Even so svn will be slow for binaries... but just curious.


The solution to the question you reference, is not to store these files in the repository at all, but rather to store them on the file system, in a location that is untracked by version control.

In general, there is no point in storing files in version control that are automatically built from your other sources. VCS is for tracking history of files, especially source files and other files which are manually changed. If you are not interested in the history of a file, and especially if it is a large binary build artifact, then the place for it is the file system, not VCS.


Take a look at git media for one possible solution that may fit your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜