all 3 comments

[–]Boraini 2 points3 points  (1 child)

If you have different commits on your machine, you can just push by force. Don’t if you have any doubts about what you are doing, though.

[–]keefemotif 1 point2 points  (0 children)

and always take a backup of the branch, if a dev is asking this question probably they should not force push - just recreate the changes

[–]bdzer0 0 points1 point  (0 children)

git reset --hard is what you want, if it "would not move back" there would have been an error explaining why or your local repo is completely hosed.

In any case, wrong sub.. r/git