You have been careless when using git reset --hard
and you then erase the remote history with git push --force
.
The modifications you made are no longer in the staging zone
,
neither locally nor remotely.
However, you can fetch your modifications back as long as you did not delete the folder .git
of your project!
To do this, you need to modify the reference logs
, accessible using git reflog
.
These logs contain all the changes made on all branches in your history.
You may thus get back all the commits that you erased.
Once you identified the reference you want to get back to,
you may use git merge
to back up the modifications in your repository
(and use git push
to push these changes to the remote repository).