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

相关推荐
大白要努力!1 天前
在 Android Studio 中使用 GitLab 添加图片到 README.md
android·gitlab·android studio
星释1 天前
如何编写GitLab-CI配置文件
ci/cd·gitlab
馨羽的玩具2 天前
gitlab rss订阅失败
gitlab
t198751282 天前
jenkins结合gitlab实现CI
ci/cd·gitlab·jenkins
一颗小豆2 天前
07-接着玩-linux的CD/CI全流程体验
gitlab
乐~~~4 天前
gitLab 切换中文模式
gitlab
炒毛豆4 天前
git 如何解决分支合并冲突(VS code可视化解决+gitLab网页解决)
git·gitlab
m0_555762905 天前
GitLab CI、GitHub Actions和Jenkins进行比较
ci/cd·gitlab·github
☆凡尘清心☆5 天前
Centos7安装gitlab
gitlab