So I've tried several approaches and none seem to be working to achieve a seemingly simples thing.
I had to move a lot of images from my local pc to my web server and I used git for that, now I want to delete them from my pc but keep them on the web server.
I tried adding the image folder to .gitignore and ran git update-index --assume-unchanged <filename>
and also git update-index --skip-worktree <filename>
, but whenever I go and delete the file from my local repository and do git status
under "changes to be committed" it has the "deleted" entry and if I push and then pull on the web server the file is removed.
I just want to keep the image files on the remote repository while being able to clear them from my local development machine.