Totally agree with that comment.
Notice some good stuff you may also use: git reset HEAD^ in order to reset last commit (useful to split commit in the middle of a rebase). Notice that some IDE will provide built-in tooling for that.
git push --force-with-lease instead of --force ; that's gonna check if anyone pushed in the meantime (it should not, but I consider it as a good practice since it will warn you)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Totally agree with that comment.
Notice some good stuff you may also use:
git reset HEAD^
in order to reset last commit (useful to split commit in the middle of a rebase). Notice that some IDE will provide built-in tooling for that.git push --force-with-lease
instead of--force
; that's gonna check if anyone pushed in the meantime (it should not, but I consider it as a good practice since it will warn you)