I have a problem with git with a detached head which I tried to correct earlier but seems I made things worse. I am working on a local project myself with no branches but it seems due to a mistake when testing an earlier version (and attempts to correct that) "git status" tells me I am at version 23, my HEAD is detached from version 20 and "master" points to version 15. It looks as if I got into this situation originally like described here: Why did my Git repo enter a detached HEAD state?
I had tried to correct a detached head earlier using a method proposed here Fix a Git detached head? ("cherry-pick") but it seems I made a mistake there. Also the first solution there is for a fix for the previous commit, not 8 commits earlier.
I am really lost at this stage and I would like to know how to get my "HEAD" and "master" attached to my current version 23 again. I would like to keep all the changes that I have in my current version.
Alternatively I could simply delete the whole git repository and start fresh again with my current version as first commit. Any advise?