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

相关推荐
_运维那些事儿15 小时前
GitLabCI/CD语法
linux·服务器·git·ci/cd·gitlab·运维开发·devops
_运维那些事儿15 小时前
GitLab&Jenkins
运维·ci/cd·gitlab·jenkins·devops
Jeacean2 天前
gitlab 仓库所有分支开启分支保护脚本
gitlab
nhfc992 天前
Gitlab备份且提交Windows服务器数据
服务器·windows·gitlab
Knight_AL2 天前
Jenkins 配置 GitLab 认证并实现自动化部署
自动化·gitlab·jenkins
危笑ioi3 天前
docker部署jenkins/gitlab/nexus3/nginx配置端口转发与ssl
nginx·docker·gitlab·jenkins·ssl
木易 士心5 天前
GitLab 安装指南
git·gitlab
Linux运维技术栈5 天前
GitLab社区版备份优化:3M包为何是独立完整备份?
运维·git·gitlab
z.q.xiao6 天前
【镜像模式】WSL如何访问windows内网服务
linux·网络·windows·gitlab·wsl·dns
github.com/starRTC6 天前
Claude Code中英文系列教程17:将Claude Code集成在GitLab工作流里面
git·gitlab·github