简体   繁体   中英

Can I assign an “alias” to a repository URL in mercurial/kiln?

I keep all my personal projects on my Kiln account and I also have a bitbucket account where I push repositories when I need to share them with people. Is there some way for me to setup an alias for a repo URL so I can do something like

hg push kiln

or

hg push bitbucket

instead of typing in the entire URL each time: hg push https://path/to/repo

Yes, you can do this in your repo's hgrc file using the paths section .

[paths]
default = https://path/to/repo
kiln = https://path/to/kiln
bitbucket = https://path/to/bitbucket

If you create new repos often, you can also add this to your ~/.hgrc file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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