mercurial - 给 hg 中的 URL 命名?

标签 mercurial tortoisehg

我已经使用 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 as hg pull URL1).

http://www.selenic.com/mercurial/hg.1.html#url-paths

还有SchemesExtension如果您在特定站点(例如 Bitbucket)上的各种存储库上进行了大量工作。

关于mercurial - 给 hg 中的 URL 命名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9304788/

相关文章:

mercurial - 检索从我的第二台机器推送的远程 mercurial 更新的正确命令

mercurial - 拉入 Mercurial 之前自动搁置(使用 TortoiseHG)?

windows-7 - Mercurial 扩展无法在 Windows 7 x64 中运行?

mercurial - 在共享驱动器上安装 TortoiseHG?

mercurial - 通过TortoiseHg进行Mercurial- merge 命名分支,然后将其关闭

windows - Mercurial 可以从 Windows 创建自己的符号链接(symbolic link)格式吗?

git - 如何将 git 存储库转换为 mercurial?

version-control - 对于开源项目来说,不共享生产设置的好策略是什么?

version-control - 使用 mercurial 执行空提交

mercurial - 将最近的提交放在 Mercurial (Hg) 的单独(命名)分支中