Git clone through a reverse tunnel

后端 未结 5 1424
余生分开走
余生分开走 2021-02-04 03:24

I have my Git repo on my machine, which has no public IP of its own, at home; I want to clone this repo at my web server. Is it correct that a reverse tunnel will allow me to pu

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-04 04:11

    Another alternative is to set up a bare repository on your server, and push to it from your local machine. Pull from there into your server's repository.

    There are many advantages:

    • you don't have to expose your private machine
    • you can work from multiple machines (e.g. your laptop and your desktop), each of which has a clone of your bare repo
    • you can even make patches on your server, push to the bare repo, and pull them onto your working machine.

    See http://joemaller.com/990/a-web-focused-git-workflow/ for a good description.

提交回复
热议问题