How can I revert files and folders after I mistakenly add files from Flutter commands in Android Studio?


I did the command

flutter create --platforms=windows,macos,linux .

mistakenly under the "ios" directory.
I just wanted to add platforms to an existing flutter project.

The command above adds many config files under the wrong directory so I want them restored.

enter image description here

I did git reset -hard but the files are still there.
How can I revert them?


Since, you are using git and it yiu haven’t committed the changes yet, try-

git chekout .

But before doing that take a copy of your file must. Hope this will help

Answered By – Siddiq Barbhuiya

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published