reverting

Git: How to ignore fast forward and revert origin [branch] to earlier commit?

安稳与你 提交于 2019-11-26 11:23:20
I used git reset --hard dc082bc... to revert to the branch back to a required previous state, due to some bad commits. This has rewound my local branch fine. However, I want to rewind the branch on 'origin' to the same commit so that I can start again. Could anyone tell me how to revert the origin branch (not master) to this commit? I've tried git push origin master, but it gives the following error ! [rejected] branch -> branch (non-fast-forward) error: failed to push some refs to 'git@github.com:xxx/xxx.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the

Git: How to ignore fast forward and revert origin [branch] to earlier commit?

為{幸葍}努か 提交于 2019-11-26 02:23:53
问题 I used git reset --hard dc082bc... to revert to the branch back to a required previous state, due to some bad commits. This has rewound my local branch fine. However, I want to rewind the branch on \'origin\' to the same commit so that I can start again. Could anyone tell me how to revert the origin branch (not master) to this commit? I\'ve tried git push origin master, but it gives the following error ! [rejected] branch -> branch (non-fast-forward) error: failed to push some refs to \'git