How use settings.local.php with Acquia Cloud I try to setup my .gitignore file. My local repo is a clone from my Drupal 8 distro from Acquia Cloud.

(I want to theme my template locally and then, step by step I want to push it to Dev on Acquia Cloud.)

So regarding handeling settings.php, whether or not to ignore settings.php and whether or not use settings.local.php:

If I look in my current settings.php is see this:

// On Acquia Cloud, this include file configures Drupal to use the correct
// database in each site environment (Dev, Stage, or Prod). To use this
// settings.php for development on your local workstation, set $db_url
// (Drupal 5 or 6) or $databases (Drupal 7 or 8) as described in comments above.


I am confused and don't know anymore how to setup my .gitignore file with all this information and whether or not use settings.local.php. Please can somebody advice my what I have to do exactly, so it's setup correctly from the beginning.
The default .gitignore file that ships with your Acquia Cloud git repository is fine as it is. See https://drupal.stackexchange.com/a/193251/23961

I also advised against adding settings.php to your .gitignore file here.

Using settings.local.php is optional. Details about the file are available in the file or the online Drupal documentation as described already here.