we are using the Magento default .gitignore for development.
https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-gitignore.html
(b.t.w. a similar version can be found here, but I would recommend the original from Magento: https://www.gitignore.io/api/magento2)
Question: why is the gitignore ignoring vendor/* files that may be installed and containing new/used extensions?
(we found out after installing an extension and wishing to commit the new code)
Appreciate it
References: Magento2 - local / staging / production deployment & gitignore
git statuson Magento 1 production sites and finding unexpected changes. In Magento 2, ignoring /vendor means turning a blind eye to a huge portion of the application. – jiheison Feb 13 '20 at 22:12