Problem with .gitignore I installed Drupal on ubuntu 16.04 via composer and I'm trying to implement continuous integration with Jenkins. So, I would like to be able to work from another location (for example from a Windows 10 PC), and a push of my changes must trigger a build on jenkins that updates the installation on the ubuntu machine.

I verified that the created .gitignore file is this:

# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/web/core/
/web/modules/contrib/
/web/themes/contrib/
/web/profiles/contrib/
/web/libraries/

# Ignore sensitive information
/web/sites/*/settings.php
/web/sites/*/settings.local.php

# Ignore Drupal's file directory
/web/sites/*/files/

# Ignore SimpleTest multi-site environment.
/web/sites/simpletest

# Ignore files generated by PhpStorm
/.idea/

# Ignore .env files as they are personal
/.env


So after having pushed the code into my git repository, I noticed that various folders are missing such as the "core" folder and I do not think that the project can work if the "core" folder is missing.

Do I simply have to update the .gitignore file? Or is there anything I need to understand better about the "modus operandi" in Drupal?
Your core directory is included in your .gitignore. I don't know which strategy you want follow but, like you have vendor, modules/contrib, themes/contrib, etc, you should launch composer install to download your core and contrib modules/themes in your workflow to complete your installation (your composer.lock should be commit).

If you prefer commit your modules, themes, profiles, libraries, core, etc., because some parts of your content are not managed by composer or because you don't want risk a bug of network during the build, you should remove these directories from your .gitignore and add them in your git repository.