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

相关推荐
Good_Starry1 天前
Git介绍--github/gitee/gitlab使用
git·gitee·gitlab·github
陌殇殇殇1 天前
使用GitLab CI构建持续集成案例
运维·ci/cd·云原生·容器·kubernetes·gitlab
吕玉生1 天前
基于GitLab 的持续集成环境
ci/cd·gitlab
henan程序媛3 天前
jenkins项目发布基础
运维·gitlab·ansible·jenkins
极小狐4 天前
极狐GitLab 签约比博斯特,助力新能源智能底盘企业研发提效
gitlab·devsecops·devops·极狐gitlab·安全合规
YoungHong19924 天前
Gitlab服务搭建相关
gitlab
sj11637394035 天前
docker-compose安装gitlab
docker·容器·gitlab
Matrix706 天前
GIT安装及集成到IDEA中操作步骤
java·git·spark·gitlab·intellij-idea
ulimpid8 天前
Git | Dockerized GitLab 安装使用(简单实操版)
学习·docker·gitlab
hrlees8 天前
从零开始Ubuntu24.04上Docker构建自动化部署(四)Docker安装gitlab
docker·自动化·gitlab