我正在为公司构建一个新的内部服务器。一开始我们使用的是拼凑起来的 svn,然后我们根据要求添加了 git。今后,我更喜欢只使用 Git。
我们的 Git 仓库:
/opt/git is 8 GB in size and has 42 folders inside of the git parent
Structure of a random project where [d] indicates directory:
branches [d], config, description, HEAD, hooks [d], info [d], objects [d], refs [d]
Branches is empty
Config has text
Description has text
HEAD has text
Hooks has the filly executable sh scripts: applypatch-msg.sample, commit-msg.sample, post-update.sample, pre-applypatch.sample, pre-commit.sample, prepare-commit-msg.sample, pre-rebase.sample, update.sample
Info has a single file called exclude which is a text file
Objects has 200 hexidecimal folders
Refs has two directories called heads and tags
我可以直接将 /opt/git 打包并在目标位置解压吗,还是需要采取其他步骤?
我们的 Subversion 仓库:
/home/repos/svn is 11 GB in size and has 63 folders inside of the svn parent
Structure of a random project where [d] indicates directory:
conf [d], db [d], format, hooks [d], locks [d], README.txt
Inside of conf has : authz, passwd, and svnserve.conf
Inside of db has : current, format, fsfs.conf, fs-type, min-unpacked-rev, rep-cache.db, revprops, revs, transactions, txn-current, txn-current-lock, txn-protorevs, uuid, and write-lock
Inside of hooks has : post-commit.tmpl, post-lock.tmpl, post-revprop-change.tmpl, post-unlock.tmpl, pre-commit.tmpl, pre-lock.tmpl, pre-revprop-change.tmpl, pre-unlock.tmpl, start-commit.tmpl
Inside of locks has : db.lock and db-logs.lock
The format file has a single integer in it
因此,由于 svn 是如何拼凑在一起的,当我迁移到新的 RHEL 服务器时,我喜欢将其转换为 git,并且进行适当的操作,甚至剥离并重新执行权限,因为现在每个项目都有单独的 authz、passwd、svnserve.conf;尽管大多数都有相同的三名工程师。
显然,这很乱。我是否可以只将 /home/repos/svn 打包成 tar 文件,确保权限得到保留(?),然后在目标上解压,因为它尚未投入生产,然后着手修复 svn 的工作方式,或将其转换为 git repo,我认为这更为理想,这样团队就只有一个存储库了。
我不熟悉 Git 和 Svn,所以如果我陈述的结构明显不正确,我深表歉意。