GithubHelp home page GithubHelp logo

xlongtang / git-hg Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cosmin/git-hg

0.0 2.0 0.0 64 KB

A git-hg utility for checking out and tracking a mercurial repo.

Home Page: http://offbytwo.github.com/git-hg

License: MIT License

git-hg's Introduction

git-hg

Description: A set of scripts for checking out and tracking a mercurial project from git. Push supported added as well although it is still experimental.

Author: Cosmin Stejerean (offbytwo)

License: MIT

Dependencies

Mercurial (hg) and python must be installed and in your $PATH.

If this is a fresh checkout run

$ git submodule update --init

to pull in fast-export. If for some reason you cannot do this get a copy of fast-export from http://repo.or.cz/w/fast-export.git and place it in the root of the checkout.

Installation

Either add /path/to/this/checkout/bin to your $PATH, or symbolic link /path/to/this/checkout/bin/git-hg into a directory on your $PATH.

Alternatively you can execute

    $ make
    $ sudo make install

to install the script and all required fast-export files in /usr/local (you can change the destination by passing eg PREFIX=/usr to make install)

Usage

  • Clone an hg repo, including ones over HTTP:

      $ git-hg clone http://some/random/hg/repo [local-git-repo-name]
    
  • Fetch updates from the hg repo:

      $ git-hg fetch
    

    or optionally:

      $ git-hg pull # same as git-hg-fetch && git merge hg/branch_name
    
  • Checkout a new branch from hg:

      $ git-hg checkout branch_name
    
  • Push changes back to hg, optionally to a specific destination:

      $ git-hg push [destination]
    

Structure

.git/hgcheckout - contains a bare mercurial checkout of the specified repo

.git/hgremote - contains a bare git repo clones from the mercurial one, this is added as a remote called "hg" in the base repo

git-hg's People

Contributors

barrywardell avatar blipvert avatar cosmin avatar d1 avatar dabrahams avatar depressed-pho avatar djpohly avatar ermshiperete avatar john-peterson avatar jonashaag avatar jstasiak avatar lhanson avatar marques-work avatar mss avatar stuartpb avatar tyru avatar weisslj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.