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

相关推荐
GoodStudyAndDayDayUp4 小时前
gitlab+portainer 实现Ruoyi Vue后端CI/CD
vue.js·ci/cd·gitlab
伊成12 小时前
gitlab提交测试分支的命令和流程
gitlab
山师第一深情15 小时前
ssh connect to remote gitlab without authority
服务器·ssh·gitlab
GoodStudyAndDayDayUp1 天前
gitlab+portainer 实现Ruoyi Vue前端CI/CD
前端·vue.js·gitlab
风屿.2 天前
部署安装gitlab-ce-17.9.7-ce.0.el8.x86_64.rpm
gitlab
亮1113 天前
GITLAB跑gradle项目 不借助maven-publish直接上传到nexus私人仓库
java·gitlab·gradle·maven
极小狐4 天前
极狐GitLab 通用软件包存储库功能介绍
java·数据库·c#·gitlab·maven
小马爱打代码4 天前
K8S - GitLab CI 自动化构建镜像入门
ci/cd·kubernetes·gitlab
杰克逊的日记4 天前
gitlab相关面试题及答案
gitlab
极小狐4 天前
极狐GitLab 容器镜像仓库功能介绍
java·前端·数据库·npm·gitlab