How can I copy my git repository from my windows machine to a linux machine via usb drive?

前端 未结 2 1097
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 07:48

I have a git server running on a windows desktop machine that has inexplicably lost the ability to connect to the internet. I want to move the repo to a linux machine. I alr

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 08:27

    You can do a git bundle: it will compress the repo in one file. It is easy to move one file, as opposed to a all repo with all its files.

    git bundle create /tmp/myrepo.bundle --all
    

    See "How can I email someone a git repository?"

    Once copied on Linux, you can clone from that one file.

    git clone myrepo.bundle
    cd myrepo
    

提交回复
热议问题