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

相关推荐
heimeiyingwang2 天前
【架构实战】GitOps实践:让运维更优雅
架构·gitlab·jenkins
中国lanwp2 天前
GitLab 按访问IP动态切换项目下载/克隆地址原理与配置说明
网络协议·tcp/ip·gitlab
heimeiyingwang3 天前
【架构实战】Jenkins+GitLab CI/CD:持续集成与持续部署实践
架构·gitlab·jenkins
ASKED_20194 天前
GitLab CI|CD 配置笔记
笔记·ci/cd·gitlab
木雷坞5 天前
csdn-enterpriseGitLab Runner docker pull 慢:并行流水线镜像拉取排查
运维·docker·容器·gitlab
一只大袋鼠5 天前
Git (三):Tag 标签管理、图形工具、IDEA 集成与 GitLab 私有化部署
开发语言·git·gitlab
Lyra_Infra8 天前
故障排查报告:GitLab 18.11.3 后台 Settings 500
gitlab
Mike_66610 天前
git@gitlab-rdc.xxxxx.com: Permission denied (publickey).fatal: 无法读取远程仓库。
git·elasticsearch·gitlab
雨声不在12 天前
gitlab ci Runner 配置
gitlab·cicd
曾庆睿13 天前
【基于 RHEL 9.3 的 K8s + GitLab 全自动化部署环境搭建第一篇】
kubernetes·自动化·gitlab