Hg-Git Mercurial Plugin

Có thể bạn quan tâm

Commands

Clone a Git repository

hg clone git://github.com/schacon/some-repo.git

Like with normal hg clone, you can optionally specify a destination directory.

Push an existing Hg repository to Git

$ cd mercurial-repo $ hg bookmark -r default master # so a ref gets created

To avoid specifying the repo path when you push and pull, edit .hg/hgrc and add:

[paths] default = git+ssh://[email protected]/schacon/some-repo.git

See the Mercurial docs for more detail on path settings.

$ hg push

This will convert all Mercurial data into Git objects and push them up to the Git server.

$ hg pull

That will pull down any commits that have been pushed to the server in the meantime and give you a new head that you can merge in.

Từ khóa » Hg 2 Git