软件使用

代码修改了一点东西,想push上去远程仓库,出现了下面的提示,仓库地址打码了

$ git push

To https://zxxxxxxxxxxxxxxxxxxxxxxxxxxx

! [rejected] master -> master (fetch first)

error: failed to push some refs to 'https://zxxxxxxxxxxxxxxxxxxxxxxxxxxx'

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.

[email protected] MINGW64 /c/MSP430/ESI_INV_CAL_3LC_V1 (master)

提示是远程仓库有的文件,在本地没有,可以在push之前先pull拉取下来远程仓库的文件再push

发现确实是我自己在远程仓库直接添加了一个README.md文件,

$ git pull

remote: Azure Repos

remote: Found 3 objects to send. (8 ms)

Unpacking objects: 100% (3/3), done.

From >https://zxxxxxxxxxxxxxxxxxxxxxxxxxxx

a8b932a..7382c48 master -> origin/master

Updating a8b932a..7382c48

Fast-forward

README.md | 9 +++++++++

1 file changed, 9 insertions(+)

create mode 100644 README.md

拉取下来,再push就可以了

 

发表评论

你的电子邮件地址不会被公开 * 为必填字段

提交评论