網站首頁 編程語言 正文
如何解決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-07-19 C語言實現二叉樹的三種遍歷
- 2022-12-01 Go語言中基本數據類型的相互轉換詳解_Golang
- 2022-01-26 maatwebsite/Excel 導入 iconv (): Detected an illegal
- 2022-03-27 PostgreSQL中的日期/時間函數詳解_PostgreSQL
- 2022-08-21 Python?Map函數保姆級使用教程_python
- 2022-09-01 React新文檔切記不要濫用effect_React
- 2022-06-09 Python字符串的轉義字符_python
- 2022-04-17 Bootstrap typeahead自動補全插件的坑
- 最近更新
-
- 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同步修改后的遠程分支