Git ignore .git folder
<p>I have a php project that uses composer for package management. One of the packages is another project belonging to the same repo. I have a need to commit my entire vendor folder, but I want to ignore the .git folder in the sub-project so that it doesn't get treated like a submodule.</p>

<p>So far I have had no success. Things I've already tried:</p>

<p>vendor/.git</p>

<p>vendor/**/.git/</p>

<p>google search</p>

<p>stack overflow search</p>

<hr>

<p>Here's what the sub-project folder looks like in GitLab. Instead of the files, it's just some kind of reference.</p>

<p><a href="https://i.stack.imgur.com/bzPVt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bzPVt.png" alt="enter image description here"></a></p>