I have made a terrible mistake.
Lets start when I had a local repo (used for developing), and a remote bare repo used for backup: no one else use this repository, just me.
Let's start from version A, pushed from local to remote. Version B was also pushed (call it Br, B Remote), but later I get back to version A locally, and made a version Bl locally.
I have done serveral other versions locally; when I tryied to push them I have encountered some difficulties since remote branch was at Br (A->Br), and local branch was at D... (A->Bl->C->D).
I have followed some online guides and I typed the command:
git reset srv/DevelopBranch
Now,
- both branches, local one and remote one are pointing to Br,
- some uncommitted changes are pending but they seems only to be relative C->D changes, not all changes since A,
- all commit after Bl seems to be erased
- if I check the tree, I have A->Br (for both local and remote branch) -> some pending changes, I also have A->Bl, and Bl seems to be in a detached state (no branch label attached)
What I hope to do: restore local and remote branches as before: A->Bl->C->D
Thank you so much... Roberto