After the last merge to the master branch of my Git repository I have lost the ability to clone repository.
Cloning into test-repository... remote: Counting objects:
Typically you can do:
git reflog master
This will give you a list of the last know positions that master has pointed to.
Once you know this you can create a temporary branch to an older version of master ie
git branch temp master@{1}
Then checkout temp and see if it is in proper order. If you don't see anything there then the commands that you did previously (delete the reflog, delete dangling commits, etc) have probably wiped out all ways to recovery.
git gc
git fsck --full
git reflog expire --expire=0 --all
git update-ref -d 0d998c99b6d01e8aabca72b1934802acf90b8fc9
git gc --aggressive
git remote update --prune
and it worked!