-1

I committed by data using git commit -m, followed by git pull and found there is an overwrite by different team, In order to solve it I ran a git reset --hard and few other commands, but I messed up everything and lost my commit. Is there a way I can rollback to my last commit.

  • 1
    Possible duplicate of [How can I undo git reset --hard HEAD~1?](http://stackoverflow.com/questions/5473/how-can-i-undo-git-reset-hard-head1) – Jeff Puckett Oct 21 '16 at 01:40

2 Answers2

1

It is not clear from your question what you did exactly. But if nothing else works, I'd try git reflog. Since you commited your changes before git pull, reflog should be able to give you the commit hash of your head before you performed the git pull.

Shakkhar
  • 189
  • 9
0

You can try resetting to a particular commit point immediately before you pulled your team's code if you know the commit hash

The attached link should be useful to you https://stackoverflow.com/a/12049323/1592471

Community
  • 1
  • 1
Leye Odumuyiwa
  • 654
  • 7
  • 9