I have 2 repositories, for frontend and backend. The remote backend repository was very different from the local and because i work alone, i decided to overwrite remote by deleting .git folder on my local repo, initiate new by git init and push all by:
git push --force dev master
but ironically I added the wrong branch by:
git remote add dev frontend-repo
and overwrite my frontend-repository which I worked last month.
I canceled the last commit by:
git revert {commit_id}
and now I have an empty frontend repository that I worked on for a month and untouched repository that i wanted to change. Localy i have all commit history and the repository itself, question - is there any way to restore this history or even completely undo recent changes?