It happens to all of us. No really, things get borked all the time. The following post is a GREAT resource for solving the messes that have been made, so you can get back to coding.
Do not be afraid to bookmark this page :)
Most common git screwups/questions and solutions - Nava Whiteford
If you find another resource you enjoy, let us know! We'd be happy to link to your recommendation as well.