从集市转换为git并同步它们的正确方法 [英] The right way to convert from bazaar to git and sync them
问题描述
我在集市中有一个开发库,我想将它转换为git并保持同步。我需要这个,因为我会和不认识义卖市场的人分享我的代码。
首先,我需要将我的义卖团转换为git。我搜索了一下,并且发现了这个博客,其中提到简单的步骤从集市转换为git。但是当我试图运行 bzr fast-export
时,它说没有这样的命令。
我尝试安装bzr fast-export,通过 sudo apt-get install bzr -fixxport
。似乎我实际上必须安装fastimport。所以我试过这个: sudo apt-get install bzr-fastimport
。现在我也可以运行bzr紧急出口。以下命令已成功完成:
bzr fast-export | git fast-import
现在我在git中拥有相同的repo。但是,我如何保持同步?谷歌搜索后,我发现我必须使用 git-bzr-ng ,但在那里没有关于github回购的说明。任何想法如何?或任何其他的选择?
有一个简单的方法来实现这一点。 bzr dpush正是我想要的。但是,需要安装 bzr-git
:
apt-get安装bzr-git
然后我必须运行这个:
bzr dpush https://bitbucket.org/myusername/myreponame,branch=master
它还支持 - 目录
(或 -d
)参数if我想从不同的目录运行它。该命令将是
bzr dpush -d / path / to / branch https://bitbucket.org/myusername/myreponame, branch = master
I have a development repository in bazaar and I want to convert it to git and keep it synced. I need this because I will be sharing my code with someone who doesn't know bazaar.
first I needed to convert my bazaar repo to git. I googled around and I found this blog which mentions simple steps to convert from bazaar to git. But when I tried to run bzr fast-export
it says there is no such command.
I tried installing bzr fast-export, by sudo apt-get install bzr-fastexport
. Seems I actually have to install fastimport. so I tried this : sudo apt-get install bzr-fastimport
. Now I can also run bzr fastexport. And following command did successfully :
bzr fast-export | git fast-import
now I have the same repo in git. But how do I maintain sync? after googling up I found out that I have to use git-bzr-ng, but there are no instructions on the github repo. Any idea how? or any other alternative?
There is a simple way to achieve this. bzr dpush does exactly what I want. However, bzr-git
needs to be installed:
apt-get install bzr-git
Then all I had to run this:
bzr dpush https://bitbucket.org/myusername/myreponame,branch=master
It also supports --directory
(or -d
) argument if I want to run it from different directory. The command would be
bzr dpush -d /path/to/branch https://bitbucket.org/myusername/myreponame,branch=master
这篇关于从集市转换为git并同步它们的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!