1

Most of the previous threads are asking how to undo the last commit. But I was wondering if is possible to undo the last uncommit. I ran git reset --hard HEAD^ but it didn't uncheckout all the files that were committed and now they are deleted.

How to commit the last un-commit action?

vesii
  • 2,760
  • 4
  • 25
  • 71
  • 1
    what is a uncommit action? – OznOg May 04 '19 at 18:36
  • What do you mean by "uncheckout all the files"? Files are not checked out. Branches are. Please explain exactly what the results you saw, and how that differs from your desired result. – Daniel Mann May 04 '19 at 19:05

1 Answers1

0

Just do git checkout - . without resetting anything

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
DonCallisto
  • 29,419
  • 9
  • 72
  • 100