Do the following step to reset a pushed branch to specific commit
git log
: run this command to log all of history to get the commit hash, it look likea9dec62f265a75fa97367238f1fffcaaad3392f0
. Copy the hash.- Firstly, reset your remote branch to destination commit by hash:
git push -f origin [hash-string]:[branch-name]
- Reset your local branch to destination commmit:
git reset [optional, type of reset
--hard] [hash-string]
- Done