How to correctly start a website using Git/Drush/Composer workflow? I am trying to follow this article to start a D8 site:
https://www.drupal.org/node/803746

The article is for D7 but I think there are no much differences.

These are the steps I followed so far:


Cloned Drupal 8.2.x repository to my dev environment
Branched to 'my-project'
Created a remote repo, replaced it as my 'origin' and renamed Drupal.org to 'drupal'.
copied the example .gitignore as is, it by default ignores settings.php and vendor folder.
Ran composer install at root
Installed Drupal to local MySQL instance (after settings up Apache)
Committed and pushed files of the entire site to repository
Created staging environment and cloned from repository
Copied settings.php, dumped dev database and re-imported it to staging, and re-ran composer install at staging environment
I ran drush rebuild to refresh cache.


I expected this to be all and now the staging environment should be up and running, but it is running with now style, apparently the themes are not correctly copied.

So my first question is what did I miss, do I have to use composer to install core themes?

My second question is, do I have to re-install any additional theme or modules using composer on all sites? Or in other words, why is it a good practice to git-ignore vendor folder rather than install once on dev env and pull dependencies from repository?



Below is a screenshot for how staging main page looks like:





[EDIT]
Checking the /admin/reports/dblog page, these was the warning that appeared a lot:

warning: file_put_contents(temporary://filexmZMo3): failed to open stream: "Drupal\Core\StreamWrapper\TemporaryStream::stream_open" call failed in file_unmanaged_save_data()
Because my dev environment was Windows and the staging environment was Linux, the temporary folder differs.

I had to fix it using the admin pages of the file system.

Later I found that I will need to do this every time I use drush config-import so I decided to overwrite the value in settings.php as following:

$conf['file_temporary_path'] = '/tmp';