git reset head to commit remote
git reset --hard <commit-hash> #Please double check your commit hash
git push -f origin master # this will force update and remove commits after this one
git reset head to commit remote
git reset --hard <commit-hash> #Please double check your commit hash
git push -f origin master # this will force update and remove commits after this one
revert on remote develop
$ git reset HEAD^ --hard
$ git push mathnet -f
undo last commit pushed
git reset # commitId
# Exemple
git reset 5310517
git revert remote branch
credit to: Jakub Narębski, Jeff Ferland and Charles Bailey
// this is helpful if you have multiple devs working in a repo and they
// have pulled from dev (or whatever branch) and gotten any of the commits
// you're planning on revertting or you don't/can't know if they have pulled.
// This will set you back to the state of the commit you want without
// overwriting any of the history. This should help prevent conflicts
$ git reset --hard <commit hash you want to revert to>
$ git reset --soft <commit hash of last/latest commit> or @{1}
$ git commit -m "reset: resetting back to # without overwriting history"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us