mac 下svn 代码迁移到git
2015-11-07 01:33
429 查看
安装
refer:
* http://blog.puhao.me/%E5%90%90%E6%A7%BD/OS-X-Yosemite(10.10)%E4%B8%8B%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8git-svn%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/
使用 git svn clone 一个svn的工程到本地
成功执行会有类似如下输出
注意:如果提示 有用户不再 –authors指定的文件里, git svn clone 是失败的,可以用echo $? 一定是非0, 本地目录是个空目录, 一定要在再添加author.txt
完成后,进入本地工程目录, 可以用git log查看该工程的日志。此时,原有的svn log都 转为了git log.
git remote add 命令该工程与gitlab上的project对接, 随后可用git remote -v 查看源
gitlab 的project在gitlab的页面上创建, 会得到project的地址:git@gitlab.comp.com:cd-op/myspider.git
将工程推进github
完成迁移,可以在gitlab project 上看到所有代码
clone svn
kevinxwdeMacBook-Air:git-project kevin$ git svn clone http://sources.***.net/svn/***/branches/spider-forked --no-metadata myspider Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains:
refer:
* http://blog.puhao.me/%E5%90%90%E6%A7%BD/OS-X-Yosemite(10.10)%E4%B8%8B%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8git-svn%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/
update svn
setting
kevinxwdeMacBook-Air:git-project kevin$ sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/SVN /System/Library/Perl/Extras/5.18/SVN kevinxwdeMacBook-Air:git-project kevin$ sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN/ /System/Library/Perl/Extras/5.18/auto/SVN
使用 git svn clone 一个svn的工程到本地
kevinxwdeMacBook-Air:git-project kevin$ git svn clone http://sources.comp.net/svn/asc_search_engine/branches/spider-forked myspider --no-metadata --authors-file=author.txt
成功执行会有类似如下输出
W: Do not be alarmed at the above message git-svn is just searching aggressively for old history. This may take a while on large repositories Checked Ahrough mkdocs.yml A LICENSE A .travis.yml A setup.py A docs/Deployment.md A docs/imgs/developer-tools-network-filter.png A docs/imgs/inspect_element.png A docs/imgs/search-for-request.png A docs/imgs/run_one_step.png A docs/imgs/request-headers.png A docs/imgs/creating_a_project.png A docs/imgs/twitch.png .... Checked out HEAD: http://sources.comp.net/svn/asc_search_engine/branches/spider-forked r4690
注意:如果提示 有用户不再 –authors指定的文件里, git svn clone 是失败的,可以用echo $? 一定是非0, 本地目录是个空目录, 一定要在再添加author.txt
完成后,进入本地工程目录, 可以用git log查看该工程的日志。此时,原有的svn log都 转为了git log.
kevinxwdeMacBook-Air:myspider kevin$ git log commit 61879afb2af90651e33dc6c7003715fc722a8da6 Author: wei.xiew <wei.xiew@comp.com> Date: Fri Nov 6 15:27:23 2015 +0000 Myspider: remove some original docs of 'pyspider', and an account and ip info in the conf file commit 32500016d6a088a18117963a52b7361a1112804b Author: wei.xiew <wei.xiew@comp.com> Date: Fri Nov 6 08:52:13 2015 +0000 Myspider: rename storage as data pipe commit 6c0981fc2afbfdfc21badd46b2433b770a7d2b30 Author: wei.xiew <wei.xiew@comp.com> Date: Fri Oct 30 02:21:21 2015 +0000 [fix #6561531][R123207]Myspider: a url seed db with mysql
git remote add 命令该工程与gitlab上的project对接, 随后可用git remote -v 查看源
gitlab 的project在gitlab的页面上创建, 会得到project的地址:git@gitlab.comp.com:cd-op/myspider.git
kevinxwdeMacBook-Air:myspider kevin$ git remote add origin git@gitlab.comp.com:cd-op/myspider.git kevinxwdeMacBook-Air:myspider kevin$ git remote -v origin git@gitlab.comp.com:cd-op/myspider.git (fetch) origin git@gitlab.comp.com:cd-op/myspider.git (push)
将工程推进github
kevinxwdeMacBook-Air:myspider kevin$ git push -u origin master The authenticity of host 'gitlab.alipay-inc.com (100.67.50.13)' can't be established. RSA key fingerprint is a4:41:80:60:b1:48:ee:b5:57:6b:8a:f5:d8:96:43:06. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'gitlab.comp.com,100.67.50.13' (RSA) to the list of known hosts. Counting objects: 358, done. Delta compression using up to 4 threads. Compressing objects: 100% (351/351), done. Writing objects: 100% (358/358), 2.16 MiB | 539.00 KiB/s, done. Total 358 (delta 141), reused 0 (delta 0) To git@gitlab.comp.com:cd-op/myspider.git * [new branch] master -> master Branch master set up to track remote branch master from origin.
完成迁移,可以在gitlab project 上看到所有代码
相关文章推荐
- 【恒生电子16年校招编程题】求两有序数组的交集并返回交集个数
- 关于C#类中重写ToString方法和PHP类中__tostring()方法的比较
- c++重载运算符注意
- Java之随机数
- 1106 1014 C语言文法定义与C程序的推导过程 冒泡程序语法树
- 怎样增加phpmyadmin导入文件上限
- Matlab畫地圖
- 益智趣味小游戏之三子棋
- TITLE: UVA 11292 Dragon of Loowater
- java入门程序100例学习笔记(008黑色星期五)
- Day2(11.1):相关代码
- java 工厂模式 详解
- 三种光照模型的计算
- kaptcha 验证码在spring mvc 中的使用
- win10-jdk环境配置
- C#日期与时间
- 嵌入式编程
- JDK1.5新特性
- eclipse for android安装过程
- Spring记录 - Jackson使用上的注意点Boolean字段