git bundle
将对象和引用打包成归档文件。 更多信息:https://git-scm.com/docs/git-bundle。
- 创建包含特定分支所有对象和引用的打包文件:
git bundle create
- 创建包含所有分支的打包文件:
git bundle create --all
- 创建当前分支最近 5 次提交的打包文件:
git bundle create -5
- 创建最近 7 天提交的打包文件:
git bundle create --since 7.days
- 验证打包文件是否有效且可应用到当前仓库:
git bundle verify
- 显示打包文件中包含的引用列表:
git bundle unbundle
- 从打包文件中解包特定分支到当前仓库:
git pull
- 从打包文件创建新仓库:
git clone
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
