Today I will tell you a different git story.

Committing mistakes are far better than committing suicide. Is not it?

There’s a girl named Silvia, she was brilliant but sometimes she made silly mistakes while committing her files. She always used to face challenges while committing. One day she made a huge mistake on a production ready branch. She committed her recent changes into a master branch instead of dev branch, the branch where all the developments occurs.

She was so nervous, she informed me that mistake of her.

As being her lead it was my responsibility to correct her mistake . So I told her to undo that commit using git reset.

She was not sure what will be the command for that. Again she asked me, I pinged her this command

Image for post

#illustration #git #commit #coding

A simple solution to revert a git commit that has been pushed to master branch
1.25 GEEK