[英]Migrating from SVN multi-repo to GIT
我是 git-svn bridge 的新手,面臨着從 SVN repo 遷移到 GIT 的任務。 SVN 結構看起來真的很糟糕:
root
base
server
core
branch
tags
trunk
webapp
branch
tags
trunk
....
client
core
branch
tags
trunk
....
....
....
作為“有才華的 svn migrate-master”,我執行了git svn clone ..../root
並克隆了整個存儲庫。 我沒有 GIT 可見的分支:
$ git branch -a * master remotes/git-svn
我可以輕松導航到root-base-server-core-branch-my-awesome-branch
,它看起來像普通文件夾。
如何繼續 svn2git 對話? 看起來我應該從頭開始,但克隆這個邪惡花了一個星期,我不想再等了......
您在該存儲庫中有多個 svn 項目。 你想在 git 中組合它們嗎? 您可能需要考慮為客戶端、核心和 web 應用程序創建一個單獨的 git 存儲庫。
查看 git svn clone 的--branches
,它可以使用多個通配符,您可能需要使用那個可怕的 svn 結構。 類似於--branches=*/*/*/*/branch/*
您還可以使用多個--branches
如--branches=coked/out/path/branch/* --branches=totally/messed/up/path/branches/*
從幫助:
-T<trunk_subdir>, --trunk=<trunk_subdir>, -t<tags_subdir>, --tags=<tags_subdir>, -b<branches_subdir>, --branches=<branches_subdir>, -s, --stdlayout These are optional command-line options for init. Each of these flags can point to a relative repository path (--tags=project/tags) or a full url (--tags=https://foo.org/project/tags). You can specify more than one --tags and/or --branches options, in case your Subversion repository places tags or branches under multiple paths. The option --stdlayout is a shorthand way of setting trunk,tags,branches as the relative paths, which is the Subversion default. If any of the other options are given as well, they take precedence.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.