sites/drupal folder not pushed to git repository My .gitignore in the drupal root is as follows:

# Ignore configuration files that may contain sensitive information.
sites/*/*settings*.php

# Ignore paths that contain generated content.
files/
sites/*/files
sites/*/private


When I pushed it to a repository on github, the sites/default folder did not get pushed.

How to solve the issue?
I would add a README file under sites/default/files
then force the file to be added to the repository by executing git add -f sites/default/files/README and push your files.

The -f flag will allow the file to be added by overriding your .gitignore file. 
The next time you clone the repository on a new location the folder sites/default and sites/default/files will be created by git.

When downloading Drupal the sites/default folder contains a file called default.settings.php. And one solution here would have been to add that file. But since your .gitignore excludes sites/*/settings.php default.settings.php file wont be added and Git will not add empty folders to the repository.