-1

enter image description here

CAN YOU SPEND 15 MIN TO REPLY ME PLEASE, I AM REALLY BROKEN, PLEASE HELP

WHAT I WANT TO KNOW IS: this was the last commit I did from the branch main, I did right click, it's showing me may options, may be I can retrieve it, but I don' know which option to click for that

The major mistake I did was.... I committed but did not synced … so it's not showing in my local repo..

BELOW IS OPTIONAL TO READ -- JUST DESCRIBED WHAT HAPPENED TO ME i completed my project, i was using gitlens supercharged extension, and i was doing everything in brach main,

then in my vscode, bottom left i pressed Main to change it to master, then i pressed master then i game me 4 options then i guess i pressed the second or third option

then all my files got deleted

Basically the files initially uploaded to master, came back to me.

I am thinking my code will merge to master, but master code got merged here.

So is there any way I can retrieve my files back?

Please help

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Please **DO NOT SHOUT AT US!** Writing in ALL CAPS is annoyingly hard to read, and it's generally considered **SHOUTING** at your readers - which is just plan rude and offensive - don't do it, and fix your post here ASAP – marc_s Sep 03 '23 at 05:58

1 Answers1

1

Yes, you can get the files back.

Find the "reflog" which is a log of the last operations you've done. You can reset your main to whichever previous version was good.

I understand you're SHOUTING because you're in a panic, but with git there is no need to panic. Instead, treat each scare as a learning opportunity, and go read some beginner introductory tutorials which teach the elementary concepts of git.

Jaredo Mills
  • 159
  • 1
  • 8