title: Git ignore embedded repositories
body: <p>I have an all-encompassing repository to track my notes. But next to the notes, there are often git repositories that I don't want to track.</p>
  <p>This is how my gitignore is setup:</p>
  <pre class="lang-sh prettyprint-override"><code>*.*
  !*.kts
  !*.org
  !*.md
  !*.txt
  !*.sc
  </code></pre>
  <p>And it works really well, so much so that I can simply do <code>git add .</code>, except for the aforementioned case of nested repositories. Currently, I have to manually add them to the gitignore - if I don't, this happens:</p>
  <pre><code>❯ g add 1-projects
  warning: adding embedded git repository: 1-projects/mixxx/mixxx-manual
  hint: You've added another git repository inside your current repository.
  hint: Clones of the outer repository will not contain the contents of
  hint: the embedded repository and will not know how to obtain it.
  hint: If you meant to add a submodule, use:
  hint: 
  hint:   git submodule add &lt;url&gt; 1-projects/mixxx/mixxx-manual
  hint: 
  hint: If you added this path by mistake, you can remove it from the
  hint: index with:
  hint: 
  hint:   git rm --cached 1-projects/mixxx/mixxx-manual
  hint: 
  hint: See &quot;git help submodule&quot; for more information.
  warning: adding embedded git repository: 1-projects/mixxx/mixxx
  warning: adding embedded git repository: 1-projects/mixxx/website                                                                                                                                                                                           
  </code></pre>
  <p>Which is what I would like to avoid. Is there some way to configure git or my gitignore to always simply ignore embedded repositories?</p>