ALL,
I unfortunately had to perform git reset --hard
to rollback to the revision I need on my local repository. That means that all commits between the old HEAD and the revision I am resetting to will be gone.
Now if I do git push --force
will the same happens on the remote GitHub repository? And how do I preserve the same deletion on another machine?
Basically I want a remote GitHub repository to look exactly the same as the local repository - all commits in between removed, and also all other machines where this repository resides deletes those commits.
Or I shouldn't be doing git reset
and need another command instead?
TIA!
P.S. As a sole developer on the code, I don't care about other people. So,
git push --force
git pull (on another machine)
is the right thing to do in order to remove commits both on remote and another machine?
question from:https://stackoverflow.com/questions/65651143/reflection-on-remote-github-repository