I have a Node.js project hosted on Heroku and I am trying to ignore my public/
folder from push when I upload to Heroku. I included the line public/
in the .gitignore
file which this is the folder I don't want to override but it's not working. When I push to Heroku all of the images stored in the public/
folder on the server are deleted.
Here is my .gitignore
:
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
# Dependency directories
node_modules/
public/
Why is this happening, and how can I prevent it?