I am using a composer managed Drupal install and want to use git to move it between development and production environments. From what I understand, the only directory that is not supposed to be in the git repo is sites/default/files. Everything else incl. modules, themes, composer files etc. would be in the repo. Composer would only be run in local dev, but not in production.
What I don't understand is which content would be used in dev when the files folder does not contain the files from production? Is it just test content, for example created by devel generate? And what happens when a new dev joins the team? Will (s)he get a db dump from another dev system to set his/her environment up, because a db dump from production would include content linking to files that are not there due to the missing files directory!?
Hope you can help me to ensure I am thinking into the wrong direction.