为一个库设置多个远程更新站用于git push,比如gitcode github等

复制代码

为当前的gitcode库添加github push功能

当前的库对应的是gitcode,远程名字设置为origin

复制代码
git remote add origin https://gitcode.com/skywalk163/liulanqifanyichajian

现在想让它也能更新推送到github,因此再加上一条远程,起个名字叫github:

复制代码
git remote add github https://github.com/skywalk163/liulanqifanyichajian
git push --set-upstream github main

github库里LICENSE 这个文件怎么删除?

push的报错:

git push github main

To https://github.com/skywalk163/jikuaiexplorer

! rejected main -> main (fetch first)

error: failed to push some refs to 'https://github.com/skywalk163/jikuaiexplorer'

hint: Updates were rejected because the remote contains work that you do not

hint: have locally. This is usually caused by another repository pushing to

hint: the same ref. If you want to integrate the remote changes, use

hint: 'git pull' before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

这个库里只有一个文件,就是LICENSE 文件。在网站没有找到删除LICENSE文件的地方....

我不想git pull 再删除。

所以最后选了把repo项目删除再重建repo的操作,重建的时候没有再选择license,这样新创建的就是一个完全空白的repo。

然后git push就pass了。

相关推荐
KING-WU5127 分钟前
Git 版本控制器实战指南
大数据·git·elasticsearch
微订校园外卖平台1 小时前
同城外卖跑腿平台需要服务器吗?交付方式、部署架构与上线核对
服务器·架构·github·外卖系统·本地生活·微订
Zhichao_971 小时前
VSCode+AI操作Git、GitHub
git·github
EchoMind-Henry1 小时前
Anthropic自建Git替代品,先看替换了什么
git
GoGeekBaird1 小时前
我做了一个给 Agent 用的电商开源项目:开店、上架、改版,跟 Agent 说一声就行
后端·github·agent
用户74638129504811 小时前
Netty实现MQTT Broker——从零构建到底值不值?
github
穆梓兰煊1 小时前
WebAssembly AI推理学习与落地路线
github
miofly2 小时前
Step 5 Preview 用 27B 激活参数运行 600B 规模模型
开源·github
HUANGZHENXUAN1232 小时前
代码解析(四):task3_serial/ —— 用 3002 条真实报文做一次逐行自证
opencv·github
miofly2 小时前
GitHub 今日推荐|open_scion:为AI代理设计的并发版本控制
开源·go·github