I don't want to send the .env and node_module file to GitHub but unfortunately, I was sent this file to Github. Now I want to delete those files from GitHub but How?
CodePudding user response:
As for the .env file You can simply open those file on github and click the delete icon on the top right
after this scroll to the bottom and commit the changes
and for the node_module folder: open the folder and click on the 3 dots on the right to delete the directory
for future make sure you add a .gitignore
file
CodePudding user response:
Just create a .gitignore file in the root folder and add .env and just any file you want git to ignore when you push changes to your repository.
Also, you can login to github from your browser, go to your repo, open the file you want to delete and click the delete button.