Remove a commit from local and remote history

  • git reset –soft commit_id
  • git stash save “message”
  • git reset –hard commit_id
  • git stash apply stash stash@{0}
  • git push —force