Logo

dev-resources.site

for different kinds of informations.

How To Remove The Uncommitted Changes in Git

Published at
6/21/2022
Categories
git
Author
Rabeeh Ebrahim
Categories
1 categories in total
git
open
How To Remove The Uncommitted Changes in Git

Have you ever changed your mind and tried to remove the uncommitted changes? I stuck at once. Doing basic things in git is easy-peasy, like live hosting, committing, pushing…etc. but when you do advanced stuff. You will be in a pickle soon.

Maybe, I am a beginner at using git at that time. Though it’s easy to remove the uncommitted changes. All you have to do is:

git reset --hard [commit id]

Actually, you don’t need that commit id (to do on the current branch). You can do without that. The recent uncommitted codes will be removed from your git folder and become as fresh as your last commit.

Featured ones: