paint-brush
Amend vs Reset: 4 Simple Ways to Reverse a Git Commit by@balastrong
161 reads

Amend vs Reset: 4 Simple Ways to Reverse a Git Commit

by Leonardo Montini4mJanuary 18th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

I'm quite sure all of these happened to you at least once. You committed a change with the wrong message (typo, wrong tense, etc.), wrong files (something missing, too many files, etc), too early (feature isn't complete yet) or you just didn't want to (wrong code, just needs to be deleted). Sure, you can just add a new commit, but in the long run this will mess up your git history. I'll also show you how to restore hard deleted changes.

People Mentioned

Mention Thumbnail
featured image - Amend vs Reset: 4 Simple Ways to Reverse a Git Commit
Leonardo Montini HackerNoon profile picture
Leonardo Montini

Leonardo Montini

@balastrong

In love with Open Source and and knowledge sharing - I like to talk about GitHub, Visual Studio Code and Web Development. Watch me on YouTube!

L O A D I N G
. . . comments & more!

About Author

Leonardo Montini HackerNoon profile picture
Leonardo Montini@balastrong
In love with Open Source and and knowledge sharing - I like to talk about GitHub, Visual Studio Code and Web Development. Watch me on YouTube!

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here