I have a git repo full of scripts. When I work on the scripts, I usually cd into the repository directory and do my editing/execution. But I also clone other git repos with test data in them, which then end up on my local machine as subfolders of the first git repo.
However, sometimes I unthinkingly/accidentally git add and/or commit these other git repos. Git knows that they're git repositories, because it scolds me when I stage them.
Easy to unstage/revert, so no harm done. However, this is annoying. I've read the gitignore docs, but I'm not seeing anything obvious - is there a way to configure git to ignore other git repositories automatically?
I've added some paths to .gitignore that cover like ~80% of the repository names, but I'd like something foolproof, if possible.