Git Mistakes: Undoing Errors with Git Reset & Revert

Day 25 of #90DaysOfDevOps – Learning How to Undo Mistakes Without Breaking Everything Today was about something every developer eventually faces: Mistakes. But more importantly — how to undo them properly. I explored the real difference between git reset and git revert, and this completely changed how I think about fixing errors in Git. Here’s what I learned: git reset Moves the branch pointer backward Can rewrite history Powerful but dangerous Should NOT be used on shared branches git revert Creates a new commit that reverses changes Preserves history Safe for production and team collaboration Big realization: Reset is for cleaning up your own room. Revert is for fixing things in a shared house. I also studied branching strategies used by real engineering teams: • GitFlow – structured, great for enterprise release cycles • GitHub Flow – simple, ideal for fast-moving startups • Trunk-Based Development – continuous integration focused, used in strong CI/CD cultures Understanding when to use each strategy made me realize that Git is not just a tool — it's a workflow design system. Day by day, I’m moving from “knowing commands” to understanding real-world engineering practices. Consistency continues. On to Day 26. #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham #Git #DevOpsJourney #LearningInPublic

To view or add a comment, sign in

Explore content categories