I\'m having some trouble understanding basic git concepts :/
I\'m testing on my local Windows machine before trying some things on my git-controlled site.
I
Git does not store directories. If you want to keep an empty directory in Git, the convention is to put there an empty file named .keepme
, and commit it.
As for the question, you will not be able to hide a file in an upstream branch from its clone, to the best of my knowledge. This is not something that Git is designed to do. Consider other options, like splitting to two repositories (and, maybe, using subtree or submodules). Or keep a separate branch in upstream to be tracked by downstream, and filter the ignore.txt
from that branch by a post-receive hook.
Tell us more of why do you want to do this, maybe there is a better way.
Anyway, I hope that you do not try to hide this file for "security" reasons — otherwise matters would be much more complicated (e.g. you have to clear it from the whole history etc.)