Site broken after update I am building a drupal 8 site and I am keeping my code on git.
I am using a copy of example.gitignore as my .gitignore which exclude vendor folder.
I have been working on my sandbox, at some point I have update drupal core from version 8.1.1 to version 8.1.3 and push it to git.

I have created a new sandbox, pulled code from git and system throw few errors because vendor folder wasn't there so I run composer install. Even then, I still had errors. I run composer update and I had errors again.

What is the right procedure in order to keep drupal 8 on git and at the same time not having problem with vendor folder?

If you download drupal 8 from drupal.org it contains vendor folder, should I keep vendor folder on git?

Thanks in advance.
I strongly recommend you (as a current best practice), to use Drupal8 Composer project

In this case, the root folder is going to contain "web" and "vendor" directories, so you will have to set your apache/nginix vhost for looking the index.php for one directory deeper.