This was seems to be nightmare for us when multiple persons working on a single website not locally but on hosting server.
One night, i was going through drush commands, in the end i found some beautiful drush commands:
Those were :
Which mean drush configuration import and drush configuration export.
What i did for for making configuration in git:
1. Created a drupal website on my local and add it to the git.
2. Other people have taken the git pull and manually imported the same database in mysql server.
3. Now i have created a folder named as custom-sync in /sites/default/
4. Change the path also here in your settings.php :
$config_directories['sync'] = 'sites/default/custom-sync';
5. now in drupal root run :
(it will export all your configuration to custom-sync folder)
6. git add, commit and push custom-sync folder
7. Now other will take git pull and run :
(it will import all configuration from custom-sync to your database)
Give it a try and let me know if you faced any error.