I have a tmp directory in my git repo I\'d like to still exist, but be ignored. I added it to .gitignore, but git status still tells me about chan
Put a / at the end of the directory name in your .gitignore file, i.e.
tmp/
If have tracked files inside that directory, you need to tell git to forget about them first (before you add the dir to the ignore list). Assuming you have nothing vital in there (i.e. that you can scratch it):
git rm -rf ./tmp/
git commit -m "untrack tmp dir"
mkdir tmp
echo tmp/ >> .gitignore
git add .gitignore ; git commit -m "add tmp/ to ignore list"
New files in that directory will not be tracked.
The --cached option to git rm only works on the index (pending changes more or less). It has no effect on the working tree or the status of what has been tracked or not.