git on UNC path

后端 未结 7 1788
南方客
南方客 2020-12-10 00:33

I have computer with Windows XP and no Internet connection, only access to network drive. I\'d like to set up a git repository on the network drive and then push to it from

7条回答
  •  有刺的猬
    2020-12-10 01:06

    First open a windows console, Run->cmd

    pushd \\172.158.1.254\network_usb
    

    now you should be able to 'cd' through all the directories on the drive. Optionally you can type a git init --bare nameOfnewRepo.git somewhere.

    popd
    

    Now open git bash and cd to the location where you want to clone the repo on the network drive

    git clone //172.158.1.254/network_usb/pathto/nameOfnewRepo.git
    

    Note that in git bash the slashes are forward and in the windows console backward.

提交回复
热议问题