0

I just reverted some changes in files. These changes were not staged or commited.

Is there anything I can do?

thanks!

emboole
  • 501
  • 6
  • 23
  • 2
    No, not from the Git side. If you're using an IDE of some kind, then check if it has a local history feature, that sometimes helps. Otherwise: learn the lesson, commit more often and re-type what you have produced. – Joachim Sauer Nov 30 '22 at 14:50
  • When in doubt, commit (or at the very least, stash). Easy to get rid of an unwanted commit. Then retrieve it later or not. But unstaged changes just don't exist to git. – Romain Valeri Nov 30 '22 at 14:53
  • 1
    Does this answer your question? [Accidentally reverted to master, lost uncommitted changes](https://stackoverflow.com/questions/7147680/accidentally-reverted-to-master-lost-uncommitted-changes) – Joachim Sauer Nov 30 '22 at 14:55

1 Answers1

1

There's not much you can do to recover your changes. If you are using Intelli as your IDE there is a "local history" you can access be right clicking on a file in the project view.

NaN
  • 7,441
  • 6
  • 32
  • 51