我遇到問題。我使用git將代碼上傳到gitlab中,但是它拋出了下面給出的一些錯誤。使用git推送代碼時出現錯誤
[email protected]:/opt/lampp/htdocs/MeetingRoomBooking/mrb_correct$ git push --all
Password for 'https://[email protected]':
To https://[email protected]/Subhraj/Meeting-room-booking.git
! [rejected] secure -> secure (fetch first)
error: failed to push some refs to 'https://[email protected]/Subhraj/Meeting-room-booking.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.
[email protected]:/opt/lampp/htdocs/MeetingRoomBooking/mrb_correct$
在此之前,我已將代碼上傳到我的存儲庫。之後,我需要爲cms.securecodewarrior.com
創建一些挑戰,因爲當我運行下面的命令時,它給了我上述錯誤。
1-git checkout -b secure
2-git push --all
請幫我解決這個錯誤。
可能重複的[混帳錯誤:未能推一些裁判](https://stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to) – YoannFleuryDev
可能重複的[混帳拒絕推非快進](https://stackoverflow.com/questions/16899243/git-rejected-push-non-fast-forward) –
我試過,但相同的錯誤信息來了。 – satya