revert

Git: remove, reset and rollback commits

We’ve all been there, you committed changes you now regret. If you didn’t share those commits with anyone yet, you’re safe. Let me show you how to remove commits from your local repository. I’ll also include an example how to roll back commits you already did share with others. ~ Use git log to see your most recent commits. Let’s say you want to revert the last three commits, you can run the following command: