1 min read

Create a backup or a bundle of your git repository

Mallim

Create a bundle

git bundle create ../myrepo.bundle master

Verify the bundle

git bundle verify ../myrepo.bundle

Deploy the bundle

  • This is the important part
mkdir newrepo
cd newrepo
git init
git bundle unbundle ../myrepo.bundle
git merge f7243b 

where f7243b is the COMMIT ref showing beside HEAD

Reference