@
msg7086 @
mozartgho svn 远程仓库肯定很大,但是也不会很大的, Subersion 基于差异,而 Git 每一次修改都将修改后的文件使用 zlib 压缩成一个 Object ,名字是 hash 格式如 {2}/{38} 存储在 .git/objects 目录 ,使用 git gc 后,写入到 objects/*.pack 对于大文件的修改, git 很容易出现体积陡增。这样的好处是,不要通过差异计算获得文件,只需要找到指定的 对象 id 然后 解压即可。
如果团队协作,项目非常大,建议使用 Subversion 或者是使用 Git 用 Submodule 机制。
Subversion 部分检出,只需要将开发者开发指定的分支或者指定的目录检出来即可。
Git Submodule 不同的开发者操作不同的 Submodule ,然后,技术主管在 总的 git 仓库设置 Submodule 的 Commit, 这个实际上可以编辑的。
分支模型, Git 的分支是均权分支,默认分支,主要指的是 remote 指向的存储库的 HEAD 里面的引用。
实际上,随着 Github 和 OSC@GIT 等代码托管网站的兴起, Pull Request 机制是比较适合 Git 的,这里带来的问题是 fork 仓库带来了磁盘存储的压力,多个 fork 请求, IO 居高不下,磁盘空间的需求几乎是呈指数增长的。
而 Subversion 的分支模型,更像文件系统目录结构,每个人对目录有不同的操作权限。在 Subversion 的官方仓库,也就是自举仓库
http://svn.apache.org/repos/asf/subversion/ trunk/ ......... The latest development sources. When people say
"Get the head of trunk", they mean the latest
revision of this directory tree.
branches/ ...... Various development branches. Typically a branch
contains a complete copy of trunk/, even if the
changes are isolated to one subdirectory. Note
that branch copies are generally removed after
they've been merged back into trunk, so what's in
branches/ now does not reflect all the branches
that have ever been created.
tags/ .......... Snapshots of releases. As a general policy, we
don't change these after they're created; if
something needs to change, we move it to
branches and work on it there.
他们的快速开发主要是 trunk, 而发布分支主要是 branches 下载分支, tag 也就是里程碑。