Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I provide a 2-way mirror of a Git repository with another SCM? (bzr, hg etc)

For the last 6 months or so I've been using a 2-way Git mirror of our main Perforce repository at work to evaluate it for our workflow. I have to say I've fallen in love with using it but it has had one fatal flaw for me so far: it's Windows support is terrible.

Generally this is not an issue for me but right now it is. I need to do some work on some locally committed work in my Git repo and I cannot get to it from the machine I need to work on as there are some unsolvable issues with the Git distro on this box.

Anyhow, what I want to do if I can is to run a second mirror: this time piggy-backing off of my Git repository but serving via Mercurial or Bazar. I've found a few tools that look promising and some references in blog comments saying that people have done this but nothing complete.

So can anyone tell me if there is a simple way to maintain a 2-way mirror to a Git repository using another DVCS that will work on Windows without any trouble?

Thanks in advance for your troubles...

Jamie

like image 249
jkp Avatar asked Jan 05 '09 09:01

jkp


People also ask

How do I mirror an entire existing Git repository into a new one?

You first have to get the original Git repository on your machine. Then, go into the repository. Finally, use the --mirror flag to copy everything in your local Git repository into the new repo.

What is Git remote mirroring?

Git mirroring is when a mirror copies the refs & the remote-tracking branches. It's supposed to be a functionally identical copy that is interchangeable with the original.


1 Answers

A new option has popped up on the scene from the folks over at GitHub: git-hg. Now there's a way to do a two-way sync between Git and Mercurial.

like image 68
jkp Avatar answered Sep 29 '22 07:09

jkp