为一个库设置多个远程更新站用于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了。

相关推荐
miofly2 小时前
Inkling 2 Small 发布,基准测试大幅超越前代但不敌同级对手
开源·github
dong_junshuai3 小时前
每天一个开源项目#153 LZ4:用块边界和有序并行换取低延迟
github
Qiongkura4 小时前
开源自荐:CodeYear:把本机 Git 历史变成年度代码手账(本地优先 · 零上传 · 已上 PyPI)
github
用户8351414049494 小时前
我把 claude-mem 跑了一遍:值得学的地方和踩到的坑
github·claude
QuZhengRong4 小时前
【Luck‑Report】 AI 智能报表助手 + RAG 知识库 + 报表引擎 V2.0.9 更新
github·agent·报表·开源项目·数据可视化
全栈陈序员6 小时前
Git】从入门到精通(八)—— git log:查看提交历史
大数据·git·elasticsearch
一条Go7 小时前
能力套餐:菜单、权限、开通范围怎么拆成三层而不打架
后端·github·saas
WeWorker7 小时前
浏览器 Agent 的两种宿命:像素派和工具派
github
GitHub实测笔记7 小时前
hyperfine 本机实测:2.96MB 上 bat 开高亮中位数 2.39s、cat 3.0ms(约 870 倍);v2 默认不走 shell
github
徐小夕10 小时前
万字长文!DeepSeek Super-agent × 企业知识库架构深度拆解与落地实践
前端·vue.js·github