`git bundle` 是否适合制作备份副本?
is `git bundle` suitable for making back-up copies?
我想要一个简单的方法来备份我的 git 存储库,所以我正在考虑 git bundle
。
我目前无法确认我能否恢复依赖 *.bundle
文件的捆绑分支的全部内容。我很困惑,因为我注意到谈论 "deltas" 被保存,可能不是其他内容。
有人可以确认 git bundle
是备份项目的合适方法,也就是说,不会丢失任何工作。
谢谢,
G
git bundle create /tmp/foo-all --all
这将生成一个文件。
参见 ProGit: little bundle of joy。
另见“How can I email someone a git repository?”
请注意,这不会备份挂钩脚本,这是设计使然,因为挂钩脚本可能包含敏感信息。
要使用该包,您可以克隆它:
git clone /tmp/foo-all newFolderOutsideAnyGitRepo
我想要一个简单的方法来备份我的 git 存储库,所以我正在考虑 git bundle
。
我目前无法确认我能否恢复依赖 *.bundle
文件的捆绑分支的全部内容。我很困惑,因为我注意到谈论 "deltas" 被保存,可能不是其他内容。
有人可以确认 git bundle
是备份项目的合适方法,也就是说,不会丢失任何工作。
谢谢,
G
git bundle create /tmp/foo-all --all
这将生成一个文件。
参见 ProGit: little bundle of joy。
另见“How can I email someone a git repository?”
请注意,这不会备份挂钩脚本,这是设计使然,因为挂钩脚本可能包含敏感信息。
要使用该包,您可以克隆它:
git clone /tmp/foo-all newFolderOutsideAnyGitRepo