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
Another possibility is one of my personal favorite commands:
git rebase -i ~1
This will start the rebase in interactive mode -i
at the point just before the commit you want to whack. The editor will start up listing all of the commits since then. Delete the line containing the commit you want to obliterate and save the file. Rebase will do the rest of the work, deleting only that commit, and replaying all of the others back into the log.