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. gitlab 转移项目

    2024-04-11 12:16:03       40 阅读
  2. Gitlab相关,【推送项目

    2024-04-11 12:16:03       39 阅读
  3. 本地项目上传gitlab

    2024-04-11 12:16:03       32 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-11 12:16:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-11 12:16:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-11 12:16:03       87 阅读
  4. Python语言-面向对象

    2024-04-11 12:16:03       96 阅读

热门阅读

  1. 怎样让网页中图片的闪烁时间可以分别设定

    2024-04-11 12:16:03       34 阅读
  2. 输入输出系统的组成以及i/o设备与主机的联系

    2024-04-11 12:16:03       38 阅读
  3. 设计模式: 结构型之享元模式(7)

    2024-04-11 12:16:03       32 阅读
  4. 【leetcode面试经典150题】40. 同构字符串(C++)

    2024-04-11 12:16:03       40 阅读
  5. LVS NAT、DR、FULL-NAT 模式介绍

    2024-04-11 12:16:03       35 阅读
  6. 浅入浅出容器化部署

    2024-04-11 12:16:03       38 阅读
  7. 访问网站时IP被阻止?解决方法

    2024-04-11 12:16:03       57 阅读
  8. 解决moviepy保存的视频画质不清晰问题

    2024-04-11 12:16:03       38 阅读
  9. 4.9

    4.9

    2024-04-11 12:16:03      38 阅读