DEV Community

Theodore Karropoulos
Theodore Karropoulos

Posted on

How to unstage staged files in git

Sometimes we need to remove a file that we added by mistake from git staging. How to achieve this? Bellow are three life saving commands!

git reset <file>
Enter fullscreen mode Exit fullscreen mode

This command will unstage a single file

git reset <folder name>
Enter fullscreen mode Exit fullscreen mode

This command will unstage a single folder and its contents

git reset
Enter fullscreen mode Exit fullscreen mode

This will unstage all due change

You can visit my blog for similar posts blog

Top comments (0)