I am developing a website on Drupal with 2 other developers. What would be the best way to collaborate? We plan to work on different git branches and there will be a dev and production branch as well. How can we keep in sync with the database structure without overwriting each others' work?
It can be done with Drupal's configuration management system. Have a read of https://www.drupal.org/docs/configuration-management to get started
Essentially any site changes apart from content can be stored in .yml files which you can import/export on each environment (storing them in GIT)
I wouldn't recommend trying to synchronize content and this is better done manually on your dev/stage/prod environment. But if you really wanted to there is the default content module which allows for content to go into .yml files too https://www.drupal.org/project/default_content