Taken from the help of git
Patterns read from a .gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file.
As your "sub .gitignore" file will override the .gitignore located in root your question should actually be
Can I make a .gitignore file to have no effect?
And the answer is no. There are ways to ignore a .gitignore file but this will only avoid the file to be commited while it will still be affecting what has to be ignored or not.
As a rule of thumb it is a bad habit to have multiple .gitignore within a project. In your case I would try to modify the content of the generated .gitignore to avoid the problem or directly the way it is generated. Your case sounds pretty strange and I think you are doing something wrong or that could be done better. You should maybe think about it again and restructure your concept. Any other solution will be just a work around