So I've looked around and understand how to add an ignored directory to a git repo, however all of these methods seem to me to result in every file in that directory being added, even those that should still really be ignored.
E.G. I have an ignored directory called dir/ and I want to add source contained (.cpp etc) to the git repo, while still applying the .gitignore file to items in that directory (i.e. continue ignoring .o files etc). The command that I think should work is:
git add --all /path/to/dir/*
This, however, also adds files which I still want ignored (.o etc).
Anyone have any thoughts on this? Thanks in advance for the help!