1.在本地公司项目文件夹, 新建一个users.txt
, 内容为svn账号和git账号的转换关系,规则为svn账号=git账号名称<username@mail.com>
,例:
chauncey=chauncey<chauncey@qq.cn>
2.svn迁移git命令
如果不需要commit信息,可以用的
git svn clone https://xxx
可以用,用这个
git svn clone https://xxx --no-metadata --trunk=/ --tags=tags --branches=branches --ignore-refs=refs/remotes/项目文件夹名-.*
3.进入项目目录
4.添加gitlab远端仓库地址
git remote add origin git@xxx.xxx.xxx.xxx:root/projectname.git
5.在gitlab仓库中建立 远端仓库项目地址,[http://xxxx
]
6.提交代码到远端仓库,注意分支,最好先提交到develope分支,android开发,可以用android studio直接push, IDEA 也类似. 或者直接用命令行
git push -u origin master
网友评论