获取历史开发人员名单 主要是为了同步SVN历史提交记录到git
进入到项目的svn根目录下,执行以下命令,可以获取到项目所有的历史提交人
svn log --xml | grep "^<author" | sort -u | \awk -F '<author>' '{print $2}' | awk -F '</author>' '{print $1}' > userinfo.txt
使用git下载SVN项目
git svn clone svn://127.0.0.1:33333/app/trunk/qct/JAVA/shinywayqct --no-metadata --authors-file=userinfo.txt project-dir
调整导出的userinfo.txt内容格式为以下例子的格式
VisualSVN Server=VisualSVN Server<igo@139.com>
beckchang=beckchang<beckchang@139.com>
bruce=bruce<bruce@@139.com>
.......
进入到项目目录下
cdproject-dir
把调整好格式的userinfo.txt 手动放到这个目录下
与远程仓库建立链接
git remote add origin http:/127.0.0.1/project.git 项目的git地址 自己替换
建立分支关联
gitlab project 先建一个readme.md
git pull 同步远程的readme.md 文件 保持代码最新
然后 git feach 同步一下
将本地master分支与远程master分支建立关联
git branch --set-upstream-to=origin/master master
上传到远程仓库
git push -u origin master
注意点
如果出现版本不匹配 就先同步一下
git pull origin master --allow-unrelated-histories
然后:q! 强制退出 再执行5
如果工程文件很多,很大
出现错误
Counting objects: 76414, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30703/30703), done.
Writing objects: 100% (76414/76414), 408.47 MiB | 89.68 MiB/s, done.
Total 76414 (delta 46523), reused 73054 (delta 43164)
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
在NGINX 上设置 比项目大的参数
client_max_body_size 50m;