I would like to know how to delete a commit.
By delete
, I mean it is as if I didn\'t make that commit, and when I do a push in the future, my changes wi
You have many alternatives, for example:
Alternative 1:
git rebase -i ~1
Change YourCommitId for the number of the commit which you want to revert back to.
Alternative 2:
git reset --hard YourCommitId
git push --force
Change YourCommitId for the number of the commit which you want to revert back to.
I don't recommend this option because you can lost your work in progress.
Alternative 3:
git reset --soft HEAD~1
You can keep your work and only undo the commit.