restoring git repository from bundle backup

后端 未结 3 1812
情歌与酒
情歌与酒 2021-01-31 08:32

i created backups of my git repository like in How to backup a local Git repository? proposed with

git bundle create /tmp/foo-all --all

I can s

3条回答
  •  旧巷少年郎
    2021-01-31 09:21

    I newer version of git is enough to do:

    git clone bundle.file
    

    the whole commands:

    mkdir ~/git
    cd ~/git
    git clone /path/to/bundle.file
    

    It will restore completely Your's git bare repository content (which will compile as it is normal source). You don't need any other file. The bundle file is enough.

    It is wise to always verify You bundle file before unbundle as follow:

    git bundle verify /path/to/bundle.file 
    

提交回复
热议问题