I have added
media/
build/
in.git/info/exclude, and after that deleted (git rm) both directories. I need these rules in the exlude file rather than .gitignore because I only want that repo to ignore it, not the blessed repo or any other repo. However running
git status
still lists the deletion of all the contents of both dirs. How do I prevent this?
EDIT
Here’s what I have; a private repo on github, my local installation, some colleagues with their own local installation, and a server. The site is a Django site, so for performance the static media files are kept separate from the actual Django installation.
However, locally we have the media file inside the Django root. Therefor the media directory is also in the blessed repo at github. But the server should ignore the directory, this is what I was trying to accomplish by adding the directory to the exclude file. But even though it’s in there, it doesn’t seem to get ignored.
adymitruk was right about the build folder, I’ve added it to my general .ignore file.
You said you deleted both the directories – so did you
git rmthem and commit it so that they are removed from the repo ( unversioned ) and not just removed in your working directory. Because, as long as they are versioned,git statuswill still show modifications to these directories ( in this case their deletion ) irrespective of the ignore.