背景:在学校做的项目都是使用SVN版本管理,遂研究了如何本地搭建GitLab,并且成功搭建在306实验室。laudukang,2017年11月20日14:01:53。
svn2git
updated by laudukang at 2017-11-20 14:10:57
1 2 3 4 5 6 7 8 9 10
| cd svn_repertory
svn log --quiet | grep -a -E "r[0-9]+ \| .+ \|" | cut -d'|' -f2 | sed 's/^ //' | sort | uniq
git svn clone <your-svn-url> --trunk="trunk" --branches="branches" -A /d/author.txt --follow-parent --username laudukang (--password <your-password> 可选)
git branch -r git checkout -b master remotes/your-branch
git push -u origin --all && git push -u origin --tags
|
reference:
- Migrating from Subversion to Git with svn2git on Windows
- Migrating from SVN to GitLab
- Converting A 5-Year-Old Repository From Subversion To Git
- Checkout remote branch using git svn
- Work-around for failing “git svn clone” (requiring full history)
- git-svn