Non core third party modules are maintained in modules directory in the Drupal root directory. Should this directory be added to the .gitignore file?
If a module is upgraded in a Staging system then why would the module be managed in a site specific Git repository when no changes are intended and the module is maintained by a third party? Surely if the module is required in production then it is a case of simply installing the module once pulling is finished?
If composer is used, would it be sufficient to run composer update once code is pulled (including composer.json) to have any missing modules installed? I am assuming that this would ensure staging and production modules are kept synchronized without maintaining code in Git.