Hg To Git Windows
Converting a mercurial hg repository to git on windows 7 there s a mercurial repository that i want to convert to git which is what we use at work.
Hg to git windows. Hg bookmark r default master hg gexport debug this creates a git bare repository. On windows the installation process for this hasn t always been the easiest as you needed to first install the dulwich python library which i always seemed to have trouble doing and then hg git. The hg git documentation says you need to run the following one time configuration. If you find hg fast export complaining about the option core ignorecase being set to true in the git repository risking possible empty changesets for renamed files you can set the option core.
Then perform a forced push. Open command line prompt and make sure all tools are available in the path. Extensions hggit hgext bookmarks git intree true conversion. Try hg clone git or hg clone git ssh for more information and instructions see hg help git list of commands.
Git for windows install the latest version select run git from the windows command prompt while installing git mercurial 2 9 msi installer x86 windows. This is the hg git plugin for mercurial adding the ability to push to and pull from a git server repository from mercurial. The hg git mercurial plugin. Add c python27 to path.
That is where you will be able to do commit and push onto your repository. We assume you start from a clean windows server 2012 machine. This will restore the original commit you had modified move the bookmark to the tip of the newly created commit only needed if using the deleted bookmarks workaround. Hg bookmarks hg and having done that you can now push to your git repository with the following simple command.
Gclear clear out the git cached data gexport export commits from mercurial to git gimport import commits from git to mercurial git cleanup clean up git commit map after history editing gverify verify that a mercurial rev matches the corresponding git rev use hg help v hggit. This means you can collaborate on git based projects from mercurial or use a git server as a collaboration point for a team with developers using both git and mercurial. I m stuck on trying to convert it. Hg push path to git repo you should see that all your commits have been pushed to git and you can navigate into the bare repository folder and do a.
I have mercurial for windows installed and i ve already cloned the hg repository locally. Then restart tortoisehg and perform a pull. Hg bookmark r default master hg gexport debug git config bool core bare false git reset head.