How can I clone "hg" from another machine?

I have 2 Ubuntu laptops on the same WiFi network. I would like to "hg clone" from one laptop to another.

In my original laptop, I have a 'hg' repository in ~ / work / myserver

and my original inet addr laptop IP address is 192.168.1.2.

So what should I do on my dest laptop so that I can clone my hg repository?

Thanks.

+4
source share
2 answers

Same:

hg clone ssh:// your-user@192.168.1.2 //home/my-user/work/myserver/ 

Note. If you are using a firewall on 192.168.1.2, you need to open port 22 for SSH. I believe Ubuntu uses ufw by default.

Note 2: Replace your user with the user you use to log in when you are sitting in 192.168.1.2

+7
source

My choice between two Linux computers will also go through ssh, as suggested by Zach .

One alternative that also runs on Windows machines is to use an integrated web server to demonstrate your repository and then clone from it.

First you run hg serve , which by default will get you a web server on port 8000, and then you just hg clone http://machine1:8000 , with the added benefit that you will get a beautiful graphical representation of your history. ( more info here )

+6
source

Source: https://habr.com/ru/post/1308639/


All Articles