How to git bundle a complete repo

后端 未结 3 758
陌清茗
陌清茗 2020-11-28 18:19

I need to transfer a complete repo to a new non-networked machine, preferable as a single file entity. The git bundle allows a git fetch, git pull

3条回答
  •  甜味超标
    2020-11-28 18:33

    First clone the repository, and include the --mirror option.

    git clone --mirror git@example.org:path/repo.git

    This ensures all remote branched are also local branches ready for bundeling.

    Then run

    git bundle create repo.bundle --all as described by the answer from Jakub Narębski

提交回复
热议问题