一、說明:
1,原倉庫爲SVN,新的倉庫爲gitlab
二、目標:
1,將所有SVN倉庫包括commit,branch全部遷移至gitlab
註釋:本次遷移只遷移倉庫,賬號未進行遷移
三、開始遷移
1,先保證有git客戶端 ,安裝省略
2,從SVN拉取代碼到並轉爲git
git svn clone http://xxxx.com/repos/dev/occ
3, 關聯遠程倉庫
cd occ
git remote add origin http:/xxxxxxr/occ.git 或者
git remote add origin git@xxxxxxr/occ.git
4,在gitlab新建倉庫 保證倉庫爲新建,沒有任何提交
5,提交gitlab 並保留所有commit ,branch
git push -u origin master