Forcefully Remove files within a directory, overriding the up-to-date check.
Be careful not to delete anything important. This is permanent. The -rf
portion forcefully removes the file without prompting for confirmation. See the resources below for more information.
Create-React-App always includes their .git and .gitignore files in the download. I create my own, so I like to delete the ones downloaded with create-react-app.
(I always forget how to do this, so I'm just making this gist to remind myself & anyone else who wants to use it.)
- In your linux/bash terminal cd into your directory
rm -rf <file>
(in this case:rm -rf .git
)- Enter
Viola! You've just forcefully deleted the .git file from your directory.