gitdelete-fileignore

Git ignore deleted files


I have a website project that has more than 50,000 unimportant files (to development) in some directories.

/website.com/files/1.txt
/website.com/files/2.txt
/website.com/files/3.txt
/website.com/files/etc.txt

The stuff in /files is already in the repo. I want to delete all the files in /files on my local copy but I want git to ignore it so it doesn't delete them when I do a pull on the web server.

Any ideas?


Solution

  • Ok Ive found a solution. Simply create a new repo in the sub directories and the parent repo will ignore them.