EnglishFrenchSpanish

OnWorks favicon

git-remote-hg - Online in the Cloud

Run git-remote-hg in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command git-remote-hg that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


git-remote-hg - bidirectional bridge between Git and Mercurial

SYNOPSIS


git clone hg::<hg repository>

DESCRIPTION


This tool allows you to transparently clone, fetch and push to and from Mercurial
repositories as if they were Git ones.

To use it you simply need to use the "hg::" prefix when specifying a remote URL (e.g. when
cloning).

EXAMPLE


$ git clone hg::http://selenic.com/repo/hello

CONFIGURATION


If you want to see Mercurial revisions as Git commit notes:

% git config core.notesRef refs/notes/hg

If you are not interested in Mercurial permanent and global branches (aka. commit labels):

% git config --global remote-hg.track-branches false

With this configuration, the branches/foo refs won’t appear.

If you want the equivalent of hg clone --insecure:

% git config --global remote-hg.insecure true

If you want git-remote-hg to be compatible with hg-git, and generate exactly the same
commits:

% git config --global remote-hg.hg-git-compat true

NOTES


Remember to run git gc --aggressive after cloning a repository, specially if it’s a big
one. Otherwise lots of space will be wasted.

The oldest version of Mercurial supported is 1.9. For the most part 1.8 works, but you
might experience some issues.

Pushing branches
To push a Mercurial named branch, you need to use the "branches/" prefix:

% git checkout branches/next
# do stuff
% git push origin branches/next

All the pushed commits will receive the "next" Mercurial named branch.

Note: Make sure you don’t have remote-hg.track-branches disabled.

Cloning HTTPS
The simplest way is to specify the user and password in the URL:

git clone hg::https://user:[email protected]/user/repo

You can also use the schemes extension:

[auth]
bb.prefix = https://bitbucket.org/user/
bb.username = user
bb.password = password

Finally, you can also use the keyring extension.

CAVEATS


The only major incompatibility is that Git octopus merges (a merge with more than two
parents) are not supported.

Mercurial branches and bookmarks have some limitations of Git branches: you can’t have
both dev/feature and dev (as Git uses files and directories to store them).

Multiple anonymous heads (which are useless anyway) are not supported; you would only see
the latest head.

Closed branches are not supported; they are not shown and you can’t close or reopen.
Additionally in certain rare situations a synchronization issue can occur (Bug #65).

02/17/2016 GIT-REMOTE-HG(1)

Use git-remote-hg online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    AstrOrzPlayer
    AstrOrzPlayer
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    b...
    Download AstrOrzPlayer
  • 2
    movistartv
    movistartv
    Kodi Movistar+ TV es un ADDON para XBMC/
    Kodi que permite disponer de un
    decodificador de los servicios IPTV de
    Movistar integrado en uno de los
    mediacenters ma...
    Download movistartv
  • 3
    Code::Blocks
    Code::Blocks
    Code::Blocks is a free, open-source,
    cross-platform C, C++ and Fortran IDE
    built to meet the most demanding needs
    of its users. It is designed to be very
    extens...
    Download Code::Blocks
  • 4
    Amidst
    Amidst
    Amidst or Advanced Minecraft Interface
    and Data/Structure Tracking is a tool to
    display an overview of a Minecraft
    world, without actually creating it. It
    can ...
    Download Amidst
  • 5
    MSYS2
    MSYS2
    MSYS2 is a collection of tools and
    libraries providing you with an
    easy-to-use environment for building,
    installing and running native Windows
    software. It con...
    Download MSYS2
  • 6
    libjpeg-turbo
    libjpeg-turbo
    libjpeg-turbo is a JPEG image codec
    that uses SIMD instructions (MMX, SSE2,
    NEON, AltiVec) to accelerate baseline
    JPEG compression and decompression on
    x86, x8...
    Download libjpeg-turbo
  • More »

Linux commands

Ad