0

I had a branch with a lot of work done on it, but unfortunately I forgot to commit those changes. Then, I used the command git checkout -f which threw away all of my changes.

Is there any way to recover my changes?

Scott Weldon
  • 8,912
  • 6
  • 47
  • 64
  • 1
    The chances of you being able to recover your work on a force checkout are virtually nil. `git checkout -f` is a destructive operation on your working index. – Makoto Apr 13 '17 at 15:09

1 Answers1

2

There is no facility in git to recover the data unless you either committed it or stashed it. If you have filesystem-level backups you could use those. Otherwise, unless losing the data would be more expensive than a crap shoot with a data recovery service, I think you're out of luck on this one.

Mark Adelsberger
  • 36,896
  • 2
  • 27
  • 48