【发布时间】:2011-10-05 20:01:39
【问题描述】:
我可以通过两步将本地 .git 推送到存储库来备份它:
git push --all ~/gitrepo
git push --tags ~/gitrepo
我可以使用git bundle 备份它。
我可以通过简单地复制整个目录或将其存档(压缩!)来备份它:
tar -zcvf gitrepo.tgz .git
并且可能有additional 方法来备份entire 本地.git。
现在的问题是它们是否真的等价? (比如logs子目录不推送)
git push 方法与git bundle 相比有哪些优势?
tar -zcvf 可以被认为是“完美的 git 备份”吗?
【问题讨论】:
标签: git