---
name: "git-hg"
section: "1"
platform: "linux"
package: "hg-fast-export"
version: "20140308-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/git-hg"
---

# git-hg(1)

tool for tracking Hg repos in Git

## NAME

git-hg - tool for tracking Hg repos in Git

## DESCRIPTION

git-hg can be used to transparently track Mercurial repositories in Git ones.

## USAGE

### To clone a mercurial repo run:

-

  clone \<path/to/mercurial/repo\> \[local\_checkout\_path\]

### If that fails (due to unnamed heads) try:

-

  clone --force \<path/to/mercurial/repo\> \[local\_checkout\_path\]

### To work with a cloned mercurial repo use:

- **fetch \[ --force \]**

  fetch latest branches from mercurial

- **pull \[ --force \] \[--rebase\]**

  fetch and merge (or rebase) the into the current branch

- **push \[destination\]**

  push latest changes to mercurial

- **checkout \[ --force \] branch\_name**

  checkout a mercurial branch
