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: stdin send error: EOF
remote: ========================================================================
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to ‘

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 ‘’: tarunjotXXXXXX
Password for ‘’:
warning: redirecting to
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