1 。这个错误提示意味着你试图推送你本地的代码改变到远程仓库,但是远程仓库有一些你本地没有的新改变。这通常发生在多个人同时在一个仓库上工作,或者你在不同的机器上进行推送和拉取操作。
To https://e.coding.net/g-dyet8625/neusoft_HIS/neusoft-HIS.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://e.coding.net/g-dyet8625/neusoft_HIS/neusoft-HIS.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命令:
①:git pull --rebase origin master
②:git push origin master