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

相关推荐
AC赳赳老秦1 小时前
防火墙规则批量配置实战:OpenClaw 自动生成模板、批量下发与合规性校验全解析
java·开发语言·人工智能·python·github·php·openclaw
FPGA验证小袁4 小时前
EMIF BFM设计与实现:把复杂时序装进“一键读写”的黑盒
github
江畔柳前堤5 小时前
第13章:docker生产环境部署实战
运维·git·docker·容器·代码复审
GuHenryCheng8 小时前
【ESP32】ESP-IDF开发环境搭建(cursor)
git·stm32·单片机·学习
汤姆yu8 小时前
macOS系统下Aider完整安装、配置与实战使用教程
大数据·人工智能·算法·macos·github·copilot
kaka。。8 小时前
GIT安装+代码推送
git
明理的路灯9 小时前
安装 git 开发工具
git
小弥儿9 小时前
GitHub今日热榜 | 2026-07-04
学习·开源·github
偏爱自由 !10 小时前
5:IDEA中git的使用--git fetch 和 git pull 和解决冲突
git·elasticsearch·intellij-idea
CoderJia程序员甲10 小时前
GitHub 热榜项目 - 周榜(2026-07-04)
ai·大模型·llm·github