gitlab 转移项目

git clone 旧项目url

git remote rm origin

git remote add origin 新的url

git push origin master:master --force

报错

error: src refspec master does not match any

error: failed to push some refs to xxx

查看当前分支 是否为master,如果为main,创建master分支

git checkout -b master

再提交

git push origin master:master --force

如果过程中报

fatal: 'origin' does not appear to be a git repository

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

请再次

git remote add origin 新的url

相关推荐
pblh1234 小时前
本地局域网部署的gitlab使用教程
gitlab
一念一花一世界15 小时前
Arbess从基础到实践(25) - 集成GitLab+阿里云OSS实现Java项目自动化构建并将制品上传Aliyun OSS
java·阿里云·gitlab·cicd·arbess
一念一花一世界2 天前
Arbess从基础到实践(23) - 集成GitLab+Hadess实现Java项目构建并上传制品
java·gitlab·cicd·arbess·制品库
HIT_Weston2 天前
63、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(七)
前端·ubuntu·gitlab
HIT_Weston3 天前
65、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(九)
前端·ubuntu·gitlab
victory04313 天前
GitLab部署报告
gitlab
HIT_Weston3 天前
64、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(八)
前端·ubuntu·gitlab
HIT_Weston3 天前
62、【Ubuntu】【Gitlab】拉出内网 Web 服务:Gitlab 配置审视(六)
前端·ubuntu·gitlab
不爱吃米饭_3 天前
Gitea 轻量级的Git方案 - Gitlab的替代品
git·gitlab·gitea
嘻哈baby4 天前
自建GitLab与CI/CD实战:团队协作完整方案
ci/cd·gitlab