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

相关推荐
Linux运维老纪4 小时前
GitLab之搭建(Building GitLab)
linux·mysql·云计算·gitlab·运维开发
啊卡无敌1 天前
记一次gitlab服务器负载过高问题处理
服务器·gitlab·github
木二_2 天前
005.Gitlab CICD变量使用
ci/cd·gitlab·devops
幻影七幻5 天前
idea gitlab 操作
gitlab
java搬砖工-苤-初心不变6 天前
解决 Go 模块与 GitLab 私有仓库权限问题:SSH、HTTPS 和自动认证指南
golang·ssh·gitlab
@BreCaspian7 天前
生成 SSH Key 并配置 GitHub/GitLab 详细教程
ssh·gitlab·github
乄bluefox11 天前
解决GitLab无法拉取项目
gitlab
laugh1232112 天前
GitLab 服务器宕机时的项目代码恢复方法
服务器·git·gitlab·数据恢复
路由侠内网穿透15 天前
本地部署仓库管理工具 Gitlab 并实现外部访问
linux·运维·服务器·网络协议·tcp/ip·gitlab
码农葫芦侠15 天前
GitLab CI/CD学习教程(第四章gitlab-ci.yml)
学习·ci/cd·gitlab