New to Git. Made a big mistake with git commit and ended up at an older commit

Posted by Ramario Depass on Stack Overflow See other posts from Stack Overflow or by Ramario Depass
Published on 2012-12-10T05:02:46Z Indexed on 2012/12/10 5:03 UTC
Read the original article Hit count: 107

Filed under:
|
|

I'm new to Git and I've made a huge mistake. Git kept prompting me with

git - rejected master -> master (non-fast-forward).

But, I still committed by using:

--force

This was disastrous, the whole project changed back to the stage it was at about a week ago. I've lost so many changes. I seem to have been pushed back to an earlier commit. Is there anyway I can get back to one of my newer commits? As I have made an enormous amount of changes and need to get them back.

Thanks.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about git