網站首頁 編程語言 正文
新建gitLabe倉庫,提交報錯:error: failed to push some refs to ‘git@gitlab.xxx.com:xxx/xxx.git’
報錯信息:
error: failed to push some refs to 'git@gitlab.xxx.com:xxx/xxx.git
問題過程:
$ touch README.md
$ git add README.md
The following paths are ignored by one of your .gitignore files:
README.md
Use -f if you really want to add them.
mengxiang:VhallModuleUI_demo_iOS vhall$ git commit -m “add README”
On branch master
Initial commit
nothing to commit
$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to ‘git@gitlab.xxx.com:xxx/xxx.git’
$ git add README.md
The following paths are ignored by one of your .gitignore files:
README.md
Use -f if you really want to add them.
$ git status
On branch master
No commits yet
Changes to be committed:
(use “git rm --cached …” to unstage)
new file: README.md
git add README.md
git commit -m “add README”
git push -u origin master
原因:README文件被忽略了,沒辦法被跟蹤,所以添加不上導致的。
原文鏈接:https://blog.csdn.net/Morris_/article/details/103145025
相關推薦
- 2023-01-18 一文帶你了解Qt中槽的使用_C 語言
- 2022-07-11 Reporting Classes中uvm_report_server的get_severity_c
- 2023-02-27 Python?input()函數案例教程_python
- 2021-11-16 使用Flutter定位包獲取地理位置_Android
- 2022-05-27 C++帶頭雙向循環鏈表超詳細解析_C 語言
- 2022-04-24 Android為View添加拖放效果的方法實例_Android
- 2022-06-08 SpringBoot jar包瘦身操作 -Dloader.path使用
- 2022-09-19 利用Python實現批量打包程序的工具_python
- 最近更新
-
- 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同步修改后的遠程分支