Geo
Geo

Reputation: 96767

How can I work in my repo using Git, and push to a Mercurial repo?

I installed hg-git, and I clone my github repository using it:

$ hg clone git+ssh://[email protected]/my/repo.git
$ git status
fatal: This operation must be run in a work tree
$ hg gexport ( now the .git is created )
$ git status
fatal: This operation must be run in a work tree

I can access the repo using Mercurial, I see the history is intact, but I can no longer use git. Ideally, I would like to be able to continue working in git, do commits, and the hg gimport followed by hg push to a mercurial server. However, I can't get the git part running. What can I do?

Upvotes: 1

Views: 478

Answers (1)

knittl
knittl

Reputation: 265141

hg-git only works from the hg side. why do you create an hg-clone, when you want to work with git?

to be able to push to another hg repository you have to pull git changes into your hg repo, then push. if you want to work with git, you have to create a git clone too (hg should be able to work with both github and your local clone when pulling from them – they have the same object ids)

Upvotes: 4

Related Questions