简体   繁体   English

如何从GitHub克隆/拉出,但推送到Kiln?

[英]How do I clone/pull from GitHub, but push to Kiln?

I don't necessarily have a preference for either Git or Mercurial. 我不一定偏爱Git或Mercurial。 I have both of them installed and find them equally difficult to get my head around. 我都安装了它们,并且发现它们同样难以左右。 I mainly use Mercurial because our repositories live in Kiln. 我主要使用Mercurial,因为我们的存储库位于窑中。

I just cloned a project from GitHub using Hg and Hg-Git. 我刚刚使用Hg和Hg-Git从GitHub克隆了一个项目。 I want to pull and merge changes from GitHub to my local repository, but I want to push changes from my local hg repository to Kiln. 我想将更改从GitHub合并到我的本地存储库,但我想将更改从我的本地hg存储库推送到Kiln。

Can this be done or is the connection to GitHub lost once it's converted to Hg? 一旦将其转换为Hg,可以做到吗?或者与GitHub的连接丢失?

When you clone a project in Mercurial, the path that you cloned from is set as the default . 在Mercurial中克隆项目时,从中克隆的路径设置为default Both push and pull will use this path if none other is specified on the command-line. 如果在命令行上未指定其他任何内容,则push和pull都将使用此路径。

If you want your push and pull URLs to be different, put the following inside your <repo>\\.hg\\hgrc : 如果您希望推送和拉动URL不同,请将以下内容放入<repo>\\.hg\\hgrc

[paths]
default = http://path/to/pull/repo
default-push = http://path/to/push/repo

With these set 有了这些

  • hg pull will automatically pull from default hg pull将自动从default
  • hg push will automatically push to default-push hg push将自动推到default-push

See hg help urls for details. 有关详细信息,请参见hg help urls

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM