git bundle
安全リポジトリの単一ファイル化
git bundle create repo.bundle --all
履歴ごと1ファイルへ書き出し、そこからclone/fetchできる。USB搬送・閉域網への持ち込み・簡易バックアップに最適。
実行例
git bundle create app.bundle --all && git clone app.bundle app束ねて別環境で展開
書式
git bundle create <file> <refs> / git clone <file> dir
実行前の注意
ファイル出力のみ。
関連コマンド
- git archiveリポジトリのアーカイブ出力
- docker saveイメージのtar書き出し
- git format-patch / amパッチの作成・適用