SVN转换为git:分支形成

时间:2019-01-16 19:30:51

标签: git svn git-svn

我的SVN存储库如下所示:
     branches/ tags/ trunk/

在branchs文件夹中,我有以下内容:
branches/dev1/example1 branches/dev2/example2 branches/dev3/example3

我希望在转换期间将git分支设置为example1example2example3

git svn clone https://myurl -T trunk -b branches/dev1/example1 -b branches/dev2/example2 -b branches/dev3/example3 -t tags -A authors-transform.txt

我正在进入Linux的无限循环。如果我不提供其他分支的选择,而只给出-b branches

,那么它可以正常工作(尽管没有形成所需的git分支!)

有人可以建议在git转换期间建立分支的方法吗?

解决方案:

 git svn clone https://myurl -T trunk -b branches/dev1 -b branches/dev2 -b branches/dev3 -t tags -A authors-transform.txt 

1 个答案:

答案 0 :(得分:1)

您已经关闭!

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePhotosTable extends Migration
{
/**
 * Run the migrations.
 *
 * @return void
 */
public function up()
{
    Schema::create('photos', function (Blueprint $table) {
        $table->increments('id');
        $table->string('size');
        $table->string('name')->unique();
        $table->integer('post_id')->unsigned()->nullable();
        $table->timestamps();
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::dropIfExists('photos');

}
}

选项git svn clone https://myurl -T trunk -b branches -t tags -A authors-transform.txt 接受目录并将该目录中的每个子目录(在您的情况下为-bdev1dev2都视为一个分支。您无需列出所有分支,只需传递dev3

-b branches可以缩写为-T trunk -b branches -t tags-s

--stdlayout