I installed Git with svn in MacPorts by
我在MacPorts中安装了带有svn的Git
sudo port install git-core +svn
I have tried to use git-svn unsuccessfully by
我试过使用git-svn失败了
git svn egUrl
and
git-svn egUrl
How can you use Git-svn in Mac after MacPorts' installation?
MacPorts安装后如何在Mac中使用Git-svn?
2 个解决方案
#1
You have to start by cloning a Svn repository into git. In my case, I use the following (my git-core is v1.6.x):
您必须首先将Svn存储库克隆到git中。就我而言,我使用以下内容(我的git-core是v1.6.x):
git svn clone https://myrepos.com/project -T trunk -b branches/*/* --prefix=svn/
git svn clone https://myrepos.com/project -T trunk -b branches / * / * --prefix = svn /
The cloning may take a while, but once complete, you'll be able to interact with your new git repository using git commands and then pull/commit to svn using git svn rebase
and git svn dcommit
, respectively.
克隆可能需要一段时间,但一旦完成,您将能够使用git命令与新的git存储库进行交互,然后分别使用git svn rebase和git svn dcommit拉/提取到svn。
This is a bit high level and doesn't offer much detail, but hopefully it will at least get you started.
这是一个有点高级别,并没有提供太多细节,但希望它至少会让你开始。
#2
Don’t forget to git init
your directory before calling git svn init
.
在调用git svn init之前,不要忘记git init你的目录。
#1
You have to start by cloning a Svn repository into git. In my case, I use the following (my git-core is v1.6.x):
您必须首先将Svn存储库克隆到git中。就我而言,我使用以下内容(我的git-core是v1.6.x):
git svn clone https://myrepos.com/project -T trunk -b branches/*/* --prefix=svn/
git svn clone https://myrepos.com/project -T trunk -b branches / * / * --prefix = svn /
The cloning may take a while, but once complete, you'll be able to interact with your new git repository using git commands and then pull/commit to svn using git svn rebase
and git svn dcommit
, respectively.
克隆可能需要一段时间,但一旦完成,您将能够使用git命令与新的git存储库进行交互,然后分别使用git svn rebase和git svn dcommit拉/提取到svn。
This is a bit high level and doesn't offer much detail, but hopefully it will at least get you started.
这是一个有点高级别,并没有提供太多细节,但希望它至少会让你开始。
#2
Don’t forget to git init
your directory before calling git svn init
.
在调用git svn init之前,不要忘记git init你的目录。