Hg-Git:如何同时推送到 Github 和 Bitbucket?
我刚刚安装了 Hg-Git,我想知道是否可以从相同的存储库。我正在考虑这样的事情:
$ #make commits
$ hg push #pushes to Bitbucket since it is set as `default` in hgrc
$ hg push "github remote alias" #push to Github
因此,默认情况下它会推送到 Bitbucket,并通过指定“远程”别名推送到 Github。
I just installed Hg-Git and I was wondering if it is possible to push to both Bitbucket.org and Github.com from the same repository. I'm thinking of something like:
$ #make commits
$ hg push #pushes to Bitbucket since it is set as `default` in hgrc
$ hg push "github remote alias" #push to Github
So, by default it pushes to Bitbucket, and to push to Github by specifying a "remote" alias.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的问题是如何使
hg Push
能够推送到多个远程目的地(一个是默认的,一个是指定的),那么这很简单。您编辑存储库中的
.hg\hgrc
文件并添加/修改:以上是我对我的项目之一的设置。默认情况下,即。只是将
hg Push
推送到 CodePlex,但我也可以通过执行hg Push kiln
要求它推送到 kiln。如果您没有指定远程目标的别名,则基本上会使用名为
default
的名称,并且除了default
之外,您还可以拥有 0 个或多个命名名称。如果这不是您的问题,请详细说明。
If your question is how to make
hg push
able to push to multiple remote destinations, one by default and one named, then that's easy.You edit the
.hg\hgrc
file in your repository and add/modify:The above is my setting for one of my projects. By default, ie. just
hg push
it pushes to CodePlex, but I can also ask it to push to kiln by executinghg push kiln
.The one named
default
is basically the one used if you don't specify the alias for a remote destinations, and you can have 0 or more named ones in addition todefault
.If that was not your question, please elaborate.