简体   繁体   English

hgrc中上游条目的作用是什么?

[英]What is the entry upstream in hgrc for?

In the hgrc file for my repository, I have two paths, one default and the other upstream . 在我的存储库的hgrc文件中,我有两个路径,一个为default路径,另一个为upstream They are identical. 它们是相同的。

Do I need the entry for upstream and if so why? 我需要upstream条目吗?如果需要,为什么? I have no idea why I have that for upstream . 我不知道为什么要在upstream

[paths]
default = https://myUrl
upstream = https://myUrl

This is just another saved remote repository. 这只是另一个已保存的远程存储库。

You can name these anything you want, the "default" name is useful in that you don't have to mention where to push to or pull from, but you can name these remote repositories, "upstream" is just such a name. 您可以随便命名这些名称,“默认”名称很有用,因为您不必提及要从哪里推送或从哪里提取,但是您可以命名这些远程存储库,“上游”就是这样的名称。

If the url of "upstream" is the same as for "default" then most likely you don't need it, unless you have scripts or programs that rely on being able to issue hg pull upstream or similar. 如果“上游”的URL与“默认”的URL相同,则很可能不需要它,除非您有依赖于能够向hg pull upstream发出hg pull upstream脚本或程序或类似的东西。

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

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