git error submit how the whole? The most deadly force rollback

First, reset the local branch to branch before you submit error 

git reset --hard To reset to commitId

 

Secondly, forced to submit to a remote local code

 

git push origin master --force

 

If you can not find how to do forced to submit? Old child is sick is not good, mostly accustomed. Remove the branch protection function just fine

 

In the branch protection set in (Setting - Respository - Protected Branches) you want to find a branch operation

unprotect a press down, they can do whatever they want to master. Implementation of the above command again be able to reset the remote branch to branch, where you specify the

Ps:

 

Pay attention, be sure to operate in adults (Great God) guardianship, this action is irreversible, all submissions will never be brought back on after reset, oh branch .

 

Guess you like

Origin www.cnblogs.com/wengXiaofeng/p/11240018.html