0

Fortunately, I executed amend previous commit before accidently executed

git reset origin/myBranch --hard.

How can I restore my last amended commit?

phd
  • 82,685
  • 13
  • 120
  • 165
Zhang
  • 3,030
  • 2
  • 14
  • 31
  • 3
    Use `git reflog` (or other means) to find the commit and then reset the branch to the specific commit. In Windows, I highly recommend GitExtensions for browsing history via UI. – user2864740 Sep 06 '20 at 03:50
  • 1
    https://stackoverflow.com/search?q=%5Bgit-reset%5D+undo+hard+reset – phd Sep 06 '20 at 13:03

0 Answers0