日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

error: failed to push some refs to 'git@gitlab.xxx.com:xxx/xxx.git

作者:Morris_ 更新時間: 2022-04-12 編程語言

新建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

欄目分類
最近更新