简体   繁体   中英

How do I clone/pull from GitHub, but push to Kiln?

I don't necessarily have a preference for either Git or Mercurial. I have both of them installed and find them equally difficult to get my head around. I mainly use Mercurial because our repositories live in Kiln.

I just cloned a project from GitHub using Hg and Hg-Git. I want to pull and merge changes from GitHub to my local repository, but I want to push changes from my local hg repository to Kiln.

Can this be done or is the connection to GitHub lost once it's converted to Hg?

When you clone a project in Mercurial, the path that you cloned from is set as the default . Both push and pull will use this path if none other is specified on the command-line.

If you want your push and pull URLs to be different, put the following inside your <repo>\\.hg\\hgrc :

[paths]
default = http://path/to/pull/repo
default-push = http://path/to/push/repo

With these set

  • hg pull will automatically pull from default
  • hg push will automatically push to default-push

See hg help urls for details.

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