Git: get back my commited data from a messed up local repo
- by Karussell
I am a newbie to git so I think I made something stupid (will move back to hg soon ;-))
Assume I'm at version A and I commited a change but didn't want that. Now assume we have version B. I didn't found a good solution how to cleanly roll B back to A but went back to A via checkout and continued commiting - assume I have version C.
A--->B
\-->C
Now the problem is that those commits were successfull (I can see the SHA's and the msg in .git/logs/HEAD)
but the commits do not show up in the log and I couldn't push them to github. Before detecting the mess I checkout to 'master' ... and git rolled all back to B.
How can I get my version C back or are my changes lost?
Is this the same problem as described here?
Please close. I posted it here. On stackoverflow seems to be more questions related to that ...