How to Undo a Git Commit Without Losing Your Changes (git reset --soft)

Publié le: 08 juillet 2026
sur la chaîne: RizBits
2
0

We've all been there: You hit enter on `git commit -m "fixed bug"`, and a split second later, you realize you forgot to change a file, left a console.log in the code, or committed to the wrong branch. 🤦‍♂️

Don't panic! In this video, I'm showing you the ultimate safety net in Git: `git reset --soft`.

Unlike a hard reset (which can permanently delete your hard work), a soft reset gently un-commits your latest changes while keeping all of your code perfectly safe and staged in your terminal. It’s the perfect trick every junior developer and intern needs to know to keep their commit history clean and stress-free.

🚀 WHAT WE COVER:
• The nightmare of making a bad commit.
• Exactly what `git reset --soft HEAD~1` does to your terminal.
• The massive difference between a --soft reset and a --hard reset.
• A live walkthrough of fixing the code and re-committing like a pro.

If this command saved your code today, smash that LIKE button and SUBSCRIBE for more practical developer workflows and tech internship secrets! 🔔

#Git #GitHub #GitReset #WebDevelopment #CodingInternship #ProgrammingTips #GitTutorial


Sur cette page du site, vous pouvez voir la vidéo en ligne How to Undo a Git Commit Without Losing Your Changes (git reset --soft) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur RizBits 08 juillet 2026, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 2 fois et il a aimé 0 téléspectateurs. Bon visionnage!