先创建仓库
先给当前仓库绑定到这三个地址
git remote add gitee https://gitee.com/zhaoyangweb/gitee.git
git remote add github https://github.com/aiyaodada/github.git
git remote add gitea https://git.zhaoyangweb.com/aiyao/gitea.git
查询下绑定成功没
git remote -v
修改nginx配置文件 如果没有反向代理gitea的话 则不需要修改
server模块 或者更大
client_max_body_size 1024M;
强制提交到未同步的里面
提交后则可以删除添加的仓库了
git remote remove gitee
git remote remove github
git remote remove gitea
懒人办法
git remote add origin https://gitee.com/zhaoyangweb/gitee.git
git remote set-url --add origin https://github.com/aiyaodada/github.git
git remote set-url --add origin https://git.zhaoyangweb.com/aiyao/gitea.git
提交时
git push origin master
拉取所有
git pull --all
以上就携带了commit历史记录提交到新仓库了 如果不行看下面
commit提交
先拉取所有信息
git clone --mirror https://gitee.com/zhaoyangweb/gitee.git
查看所有分支的提交历史
git log --all --oneline
查看所有分支 (本地和远程跟踪)
git branch -a
查看所有标签
git tag -l
修改本地仓库的远程 URL 例如转到github
git remote set-url origin https://github.com/aiyaodada/github.git
推送
git push --mirror origin
项目比较大的话
增加 Git 缓冲区大小
git config --global http.postBuffer 524288000
启用 Git 长路径支持(Windows 特有)
git config --global core.longpaths true
有问题联系微信:C2655906529或者QQ:2655906529
文章评论