2017-06-22 12 views
-1

問題があります。私はgitlabにコードをアップロードするためにgitを使用していますが、その下にあるいくつかのエラーを投げます。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 

私はこのエラーを解決するのに役立ちます。

+1

[gitエラー:いくつかの参照をプッシュできませんでした](https://stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to) – YoannFleuryDev

+0

可能な複製[git rejected fast-forward-forward](https://stackoverflow.com/questions/16899243/git-rejected-push-non-fast-forward) –

+0

同じエラーメッセージが表示されました。 – satya

答えて

0

エラーが示されているため、ローカルコピーにはないコードがあります。 リモートリポジトリからプルしてローカルコピーとマージしてから、もう一度押してください。

+0

'git pull'はこのための適切なコマンドです。 – satya

+0

私はリモートからこの最初のプルが好きでしたし、プッシュしますが、それでも同じエラーです。 – satya

+1

リポジトリに必要なものが何も含まれていないと確信できたら、 'git push -f'を実行して強制的にプッシュします –

関連する問題