網站首頁 編程語言 正文
如何解決git上傳文件出錯 [rejected] cjp -> cjp (fetch first)error: failed to push some refs to
作者:小陳同學,, 更新時間: 2022-04-12 編程語言很久沒提交代碼了,使用Git上傳本地文件到github時,出現報錯
git add .
git commit -m"拖拽"
git push origin cjp
當執行到push時,就會報錯,報錯代碼如下:
$ git push origin cjp
To http://xxx.git
! [rejected] cjp -> cjp (fetch first)
error: failed to push some refs to 'http://xxx.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
出現這個問題是因為github中的README.md文件不在本地代碼目錄中,可以通過如下命令進行代碼合并
git pull --rebase origin cjp
?然后
git push origin cjp
便可上傳成功!
原文鏈接:https://blog.csdn.net/ping_lvy/article/details/121033644
相關推薦
- 2022-02-13 如何寫一個自己的strcpy函數
- 2024-01-11 String.valueOf() 方法的使用
- 2022-10-20 Android開發使用RecyclerView添加點擊事件實例詳解_Android
- 2022-05-22 jQuery常用事件方法mouseenter+mouseleave+hover_jquery
- 2022-04-10 el-table中使用el-select,選擇后不刷新解決方法
- 2022-10-16 python列表倒序的幾種方法(切片、reverse()、reversed())_python
- 2022-12-23 Mariadb數據庫主從復制同步配置過程實例_mariadb
- 2022-10-14 Springboot整合Netty提供WebSocket服務
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支