Cannot push the the code to github. Error :Updates were rejected because the tip of your current branch is behind your remote counterpart

At first it was showing this error…

remote: fatal: pack exceeds maximum allowed size
remote:
remote: ========================================================================
remote:
remote: stdin send error: EOF
remote:
remote: ========================================================================
remote:
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to ‘git@gitlab.crio.do:COHORT_ME_QBOX_ENROLL_CRIO_LAUNCH_202

then I googled and ran this command…

git reset --hard yourFirstCommitSHA1

And now all of my files and work is gone and on top of that showing this error…

I thought that it would take me to my last commit but it did not and thus took me to start of my module 5.

I completed the above steps the new folder is of 8.1 mb now…but after I push the code for assessment it shows this…
Username for ‘https://gitlab.crio.do’: tarunjotXXXXXX
Password for ‘https://tarunjotXXXXX@gitlab.crio.do’:
warning: redirecting to https://gitlab.crio.do/COHORT_ME_QBOX_ENROLL_CRIO_LAUNCH_2020/tarunjotXXXXX-me_qbox.git/
Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
Everything up-to-date
Great Work! Your assessment report will be available shortly.

But assessment is not getting ready…I have tried twice but still no assessment.

This happens when your workspace is behind the remote by few commits.
So, do a git pull before you push new code. If you read the error message, they have a hint mentioning the same.
After git pull, it might open up some merge conflicts based on the changes that you have made. So deal with them before push.

1 Like