I am maintaining a Laravel project on heroku using git.
There is a folder public/assets/uploads which has jpg image files in it. So I have added public/assets/uploads/*.jpg to .gitignore.
As expected, any new files created in this folder is ignored while doing git push, but unexpectedly, it also removes my already existing .jpg files on the server.
I don't want any one to one correspondence between my local uploads/ folder and the uploads/ folder on the server. Local changes should stay local and online changes should stay online. I have been hittig my head for a long time searching on google and haven't found any solution.