網站首頁 編程語言 正文
目錄
名稱與 refs/heads/xxx 沖突
non-fast-forward(不能快速跟進)
名稱與 refs/heads/xxx 沖突
$ git push origin HEAD:feature/xujingjian-20210318-xj-1.5.0-122187
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
To ssh://192.168.14.227:22/DefaultCollection/PSSCS/_git/app_peiwang_ionic_chat_2.0
! [remote rejected] HEAD -> feature/xujingjian-20210318-xj-1.5.0-122187 (名稱與 refs/heads/feature 沖突)
error: failed to push some refs to 'ssh://192.168.14.227:22/DefaultCollection/_git/app_2.0'
這個異常提示信息很少,但已經指出了異常是“名稱與 refs/heads/feature 沖突”,feature是要push分支xujingjian-20210318-xj-1.5.0-122187所在的文件夾。為什么會提示它呢?為了搞明白去遠程倉庫檢查了一下,原來沒有feature這個文件夾。解決辦法:創建feature文件夾,或把分支Push到其他文件下面。
non-fast-forward(不能快速跟進)
$ git push origin HEAD:xujingjian-20210318-xj-1.5.0-122187
To ssh://192.168.14.227:22/DefaultCollection/_git/app_2.0
! [rejected] HEAD -> xujingjian-20210318-xj-1.5.0-122187 (non-fast-forward)
error: failed to push some refs to 'ssh://192.168.14.227:22/DefaultCollection/PSSCS/_git/app_peiwang_ionic_chat_2.0'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.
這個異常是non-fast-forward(不能快速跟進),就是說遠程倉庫已經有比本地倉庫更新的commit?;蛟S是你的同事先一步提交了代碼。
解決辦法:
- ?先git pull origin?xujingjian-20210318-xj-1.5.0-122187
- 如果有文件沖突先合并沖突,然后再git add 、git commit 、git push
?
原文鏈接:https://blog.csdn.net/xjj1314/article/details/114981038
相關推薦
- 2022-10-09 python將寫好的程序打包成exe可執行文件_python
- 2022-07-14 python如何獲取當前系統的日期_python
- 2022-11-16 Kotlin條件控制語句匯總講解_Android
- 2022-07-22 DML語言-insert、update、delete操作
- 2022-03-20 C++學習筆記之類與對象詳解_C 語言
- 2022-06-30 Pyqt實現簡易計算器功能_python
- 2022-08-18 Redis7.0部署集群的實現步驟_Redis
- 2022-07-24 詳解Flutter中StatefulBuilder組件的使用_Android
- 最近更新
-
- 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同步修改后的遠程分支