I was working on a project which was committed on GitHub. I made some changes and tried to commit it to the repo, But I got the error saying Your branch is ahead of 'origin/main' by 3 commits.
So I tried to go back to the branch origin/main
and I did git reset --hard origin/master
Now I was on the main branch. So I pushed the code on Github. Code got pushed but it was not reflected in the repo.
And When I came back to the editor all the changes I made on Local machine were gone it is not there.
I need my changes made codes back on my local machine.
Please Help!