Branches\
Project1/
Branch11/
...
Branch1N/
Project2/
Branch21/
ProjectX/ # not anywhere else
Excluded1\
Excluded2\
Excluded3\
Excluded4\
Programs\
Excluded11\
...
Excluded1N\
Project1/ # the main one
Project2/
...
ProjectN/
Tags\
Project1/
Release1/
...
Release69/
排除我設法排除 - 但我完全無法理解我怎麼能分支/標籤映射成git分支/標籤 - 最好在事實之後(每個克隆花費大約5個小時)。
請記住我是SVN的新手 - 我不知道,也不理解分支/標記系統。
我對windoz - svn2git沒有選擇(反正我很感興趣,我是如何做到這一點的克隆後或克隆更糟再次但是香草混帳僅)
此外,我不打算以此作爲永久遷移,它將作爲SVN和dev中使用的新git repo之間的橋樑 - 所以我想保留儘可能多的信息 - 但不超過需要。在某些時候,它可能會成爲永久性的 - 在那裏當我將需要過濾掉空提交(被排除在外的項目),我想
命令:
$ git svn clone --ignore-paths="^(?:Releases|Projects|Scripts|Games|)/|^Programs/(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/" --authors-file=authors_with_emails.txt svn://svn.code.sf.net/p/oblivionworks/code/ .
克隆後(?)我有:
$ git branch -r
git-svn
$ git branch
* master
回顧:我有cloned the thing,不包括我想排除的內容 - 現在我想說的是爲git「爲每個svn分支創建一個git分支 - 一個真正的git分支,計算增量並壓縮它們並刪除文件夾Branches
- 並跟蹤它們 - 而這個(700 mb)的標籤目錄就是標籤 - 你可以做些什麼(他們做而不是對應於提交)?「
我看不出有什麼邪惡幹線
我config
:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[svn-remote "svn"]
ignore-paths = ^(?:Releases|Projects|Scripts|Games|)/|^Programs/(?:Nif Scanner|Nif Viewer|Raziel23x's Oblivion Toolset|Shader Disasm|Shader Editor)/
url = svn://svn.code.sf.net/p/oblivionworks/code
fetch = :refs/remotes/git-svn
[svn]
authorsfile = authors_with_emails.txt
[gui]
wmstate = zoomed
geometry = 787x377+54+59 305 1127
[remote "github"]
url = https://github.com/Utumno/wrye_bash_refactoring.git
fetch = +refs/heads/*:refs/remotes/github/*
[branch "master"]
remote = github
merge = refs/heads/master
將嘗試那些儘快 - 同時你能解釋一下腳本實際上做了什麼 - 特別是'[svn-remote「svn」]'?他們指的是什麼主幹? _這會得到實際壓縮到git數據庫中的「分支」嗎?如果你看看實際的回購並提供了一些示例代碼,這將有助於(至少我)。您還需要詳細闡述我不明白的映射邏輯 - 問題是回購的結構。添加配置 –
另外 - 沒有主幹 - 你沒有解決創建git分支的問題 - 真正的git分支知道他們只是增量 - 所以'分支/ Project1/ Branch11 /'應該知道它是一個分支在'Programs/Project1 /' –
'[svn-remote「svn」]中的文件中找到#url = svn://svn.code.sf.net/p/oblivionworks/code fetch =:refs/remotes/git-svn分支=分支/ */*:refs/remotes/*',然後是'rm .git/svn/.metadata',然後'git svn fetch',現在我的分支被解除了遠程分支 - 我從哪裏出發? '$ git的分支-a *主 遙控器/混帳svn的 遙控器/ github上/主 遙控器/ SVN分支/ CBash的/ dev-sharlikran 遙控器/ SVN分支/ Wrye%20Bash/291-修復 #。 .. remotes/svn-branches/Wrye%20Flash/Fallout%203 remotes/svn-branches/Wrye%20Flash/Fallout%20NV' –