Recovery of files from .git



  • Inexperienced. git reset --hard HEAD~2 When there were only two commites (no pushing at any time, only the files in the local repel), didn't know it was completely seized by the files: did it result in an empty directory with .git (600m), could the files be restored? Time's on fire, really! Don't trust this article! https://habrahabr.ru/post/138590/



  • Yes, it's probably possible. Do the team. git reflog - it's your local work log. That's where you're gonna see your shasha committs. Now you can try. git checkout <shaхеш> - I mean, somewhere like that. git checkout ab1cd3♪ If you're lucky, the weeds will be restored. And then a new branch can be made of it (git branch recoveryand work as usual.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2