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

相关推荐
1candobetter1 天前
GitLab 项目创建与分支管理全流程
gitlab
林鸿群3 天前
Ubuntu 26.04 本地安装 GitLab CE 完整教程(非 Docker 方式)
linux·ubuntu·gitlab·私有部署·代码托管·ubuntu 26.04·omnibus
ascarl20104 天前
IDEA 一直弹 GitLab 登录,VS Code 却能正常 `git push`?问题排查记录
git·gitlab·intellij-idea
企鹅郁金香6 天前
Gitlab和Confluence和Svn的备份
svn·gitlab·confluence·gitlab备份·svn备份·confluence备份
barbyQAQ6 天前
GitLab CI/CD 基本用法指南
java·ci/cd·gitlab
云中飞鸿7 天前
git、svn;TortoiseGit、TortoiseSVN;gitlab、github、bitbucket、bamboo有什么关系?
git·svn·gitlab
007张三丰9 天前
掌握核心!Git最常用的15个命令行:从入门到实战详解
git·gitlab·github·git命令行·常用命令行
人间打气筒(Ada)11 天前
gitlab私有仓库搭建
运维·gitlab·项目实战·devops·代码部署实战·版本控制仓库
黑蛋同志11 天前
Rocky Linux 10 上搭建 社区版 GitLab CE
linux·运维·gitlab
gpio_0111 天前
自建gitlab服务器并用sakurafrp穿透
运维·服务器·gitlab