Skip to content

Instantly share code, notes, and snippets.

@cointoss1973
Last active December 15, 2015 03:29
Show Gist options
  • Save cointoss1973/5194847 to your computer and use it in GitHub Desktop.
Save cointoss1973/5194847 to your computer and use it in GitHub Desktop.
hg-git コトハジメ

hg-git コトハジメ

hg-git とは?

hg-git とは、Gitリポジトリを mercurial のコマンドで操作できる Mercurialの拡張です。

インストール方法

$ cd ~/hgext
$ hg clone https://bitbucket.org/durin42/hg-git

セットアップ方法

.hgrc に下記を追加してください

[extensions]
hggit = ~/hgext/hg-git/hggit
  • 必要なライブラリ

https://pypi.python.org/pypi/dulwich

$ sudo pip install dulwich とかでインストールしてください

Note

debian の場合は、python-dev も必要。 sudo apt-get install python-dev

簡単な使い方

github の下記リポジトリを例に実行してみます

git

$ hg clone git://github.com/bernhardHartleb/simple-socket.git
複製先ディレクトリ: simple-socket
importing git objects into hg
ブランチ default へ更新中
  ファイルの更新数 43、 マージ数 0、 削除数 0、 衝突未解消数 0

https の場合

git+ を頭につけてください。

$ hg clone git+https://github.com/bernhardHartleb/simple-socket.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment