How to clone repository to a remote server/repository with Mercurial

后端 未结 3 905
说谎
说谎 2020-12-05 00:32

Found myself quite confused today about this.

I create a blank repository locally(hg init), cloned it to working copy, added some code, commited and pushed it(to loc

3条回答
  •  星月不相逢
    2020-12-05 00:55

    You'll want to check out the publishing repositories wiki page to get into web interfaces and access controls, but at it's most basic you can do something like this:

    hg clone yourlocalrepo ssh://you@server//home/you/repo
    

    That clones your local repo to a remote location of your choosing. Note that there are two double slashes in that URL.

    You can't create a remote repo like that using http://, only ssh://. If all you have is http to hgweb.cgi you can 'hg init' an empty repo on the server and then hg push to it.

提交回复
热议问题