How to setup and clone a remote git repo on Windows?

后端 未结 2 843
温柔的废话
温柔的废话 2020-12-14 02:46

Anybody know how to checkout, clone, or fetch project or code from a git remote repository on a Windows server?

Repository IP is: xxx.xx.xxx.xx, source

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-14 02:57

    First of all, the git repository is just a bunch of files you need to access. You wrote about cloning and fetching repository, and this is easy part - you just need to access the files (and have read rights).

    It can be done by direct access to filesystem, by http(s) protocol, or by ssh connection. Actually, there is even a way to do it by ftp server.

    What you can do:

    1) set the ssh server, then access the git files via ssh server - actually, the path you should use depends on the ssh server you use on windows: source

    2) set the web server to access the file: git clone http://host/path/to/repo

    3) mount filesystem from windows on your linux machine and clone repo: git clone /mnt/filesystem/path/to/repo

    Despite the method you choose I suggest to consult the apropriate chapter from Pro Git Book

提交回复
热议问题