我已经使用 Git 有一段时间了,并且习惯于将 Remote 添加到我的存储库中,因此我可以从具有特定名称的 URL 进行推送和拉取。是否可以在 hg 中做同样的事情?我厌倦了每次想要推送时都输入完整的 URL。
最佳答案
These URLs can all be stored in your configuration file with path aliases under the [paths] section like so:
[paths] alias1 = URL1 alias2 = URL2 ...
You can then use the alias for any command that uses a URL (for example
hg pull alias1
will be treated ashg pull URL1
).
http://www.selenic.com/mercurial/hg.1.html#url-paths
还有SchemesExtension如果您在特定站点(例如 Bitbucket)上的各种存储库上进行了大量工作。
关于mercurial - 给 hg 中的 URL 命名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9304788/