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

相关推荐
Phil3231 天前
开源一个 Windows 实时面试助手:听译、置顶提词、按需生成英文稿
面试·github
千纸鹤1901 天前
Kafka vs RabbitMQ:在秒杀场景下如何选型与
github
lingran__1 天前
Git 完全指南(二):分支管理
git·分支管理·版本控制·团队协作·多人开发·git flow
左青1 天前
零 token 发布 npm 包:Trusted Publisher + OIDC 实战(附五个真实的坑)
github
编程快车1 天前
GitHub 从入门到精通(精炼版):30 分钟跑通建仓、提交与协作
github
WebInfra1 天前
Rslib 1.0 正式发布:面向多场景的 JavaScript 库开发工具
前端·javascript·github
Tongsr1 天前
别只混淆代码:用 Kaleido 加固整个 Android Release AAB
前端·算法·github
敢敢是只喵i1 天前
WorkBuddy 开放生态之后,AI 真正进入业务系统还缺什么?
github
必须会一定会1 天前
Agent Handoff v0.6.0 跨电脑同步:Git、EVENTS.jsonl、CONTEXT.md 使用方法
人工智能·git·ai编程
泡海椒1 天前
响应自动序列化:JSON 响应一键转 Java 实体对象,JQuick-Curl 第三方接口调用不再手动解析
后端·github