赞
踩
** 工作用需要将git仓库迁移到另外一个地址,通过下列方式迁移可以保留修改历史记录,留作记录
* 1. 备份裸版仓库
git clone --bare git clone -bare https://xieyiwen@git.dev.yuanben.org/***/universe-java-sdk.git
–bare 创建的克隆版本库都不包含工作区,直接就是版本库的内容。
* 2. 迁移到新的仓库
cd universe-java-sdk.git
git push --mirror https://github.com/yuanbenio/universer-java-sdk
按照提示输入github的账号和密码。
–mirror:推送镜像
* 3. 删除废文件
cd ..
rm -rf universe-java-sdk.git
删除文件夹
* 4. 本地更换git地址
1. git remote rm origin //remove old remote repository
2. git remote add origin/master https://github.com/yuanbenio/universe-java-sdk.git // add one new remote repository
3. git remote // check remote repository
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。