網站首頁 編程語言 正文
今天在本地新建了個項目,在碼云上也建了個倉庫,想從本地推送到碼云,但是git push -u origin master
,報錯:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/xxx/app.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.
查找后,使用:git pull --rebase origin master
解決
rebase與merge區別:
rebase 會把你當前分支的 commit 放到公共分支的最后面,所以叫變基。
merge 會把公共分支和你當前的commit 合并在一起,形成一個新的 commit 提交
原文鏈接:https://blog.csdn.net/weixin_44634372/article/details/119795326
- 上一篇:微服務架構之服務注冊與發現實踐示例詳解_服務器其它
- 下一篇:微信小程序音樂播放器
相關推薦
- 2022-05-23 iOS實現全局懸浮按鈕_IOS
- 2022-10-07 C++函數指針與指針函數有哪些關系和區別_C 語言
- 2022-09-25 git問題:“ unable to auto-detect email address”或 “***
- 2022-11-09 Python數據庫sqlite3圖文實例詳解_python
- 2022-09-22 YOLO v5模型的yaml文件參數理解
- 2022-09-28 React報錯解決之ref返回undefined或null_React
- 2023-05-21 Python使用win32com.client的方法示例_python
- 2022-11-29 將VSCode添加至右鍵的菜單欄
- 最近更新
-
- 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同步修改后的遠程分支