This is what I have done:
git commit -m 'feature 1 implemented'
git push origin feature-branch
..few days later
git commit --amend --no-edit
git push -f origin feature-branch
And then I realised that feature branch have contained commits pushed by others which I just screw up because I forgot to
git pull
As I understood from another questions git push --force can be easily undone
- if you have working local copy
- if you can get the commit sha
But in my case I don't know these details, I have rewritten others commits
I know I can ask my teammembers to force update without pulling, but still
Is there a way to undo --force push and git pull this data ?