[英]Migrate subfolders of SVN repo to git
是否可以僅將SVN存儲庫的一部分遷移到Git? 請注意,我必須遷移根目錄中的多個文件夾,但不是全部。 例如,給出以下回購:
REPO_ROOT
- FOLDER_A
- FOLDER_B
- FOLDER_C
- FOLDER_D
我只想遷移到Git FOLDER_B
和FOLDER_C
是。 您必須從文件夾的URL克隆,並且(對於Git 1.6.4+)使用(其他除外)選項--no-minimize-url
git svn clone --prefix=svn/ --authors-file=authors.txt --no-minimize-url http://PEPO/PATH/TO/FOLDER/ ...
我找到了一個方便的解決方案:
git remote add -f tmp_repo PATH_OF_THE_SVN_CONE
git merge -s ours –no-commit tmp_repo/master
git read-tree –prefix=Demo/Kinect -u Kinect/master
git remote remove tmp_repo
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.