Which Foundation 6 files need to be uploaded to my host in order to make my Drupal 8 custom theme working with full capabilities I installed Foundation 6 into my themes/custom/mytheme folder using foundation new. I get my starter kit, all good and ready to go.

I am not sure which files I need to upload to my host in order for my sites full capabilities.

I track my whole Drupal 8 website using Git.

With the installation of Foundation 6 there comes a .gitignore file. In this .gitignore file it ignores:

bower_components
node_modules
npm-debug.log
css


But when I want to commit my Foundation 6 custom theme to the server I need files inside bower_components folder? Or do I mis something here?

When you look at Foundation 6 example index.html they load:

bower_components/jquery/dist/jquery.js
bower_components/what-input/what-input.js
bower_components/foundation-sites/dist/foundation.js



What do I have to do with the Foundation .gitignore file exactly?
And which javascript files do I have to attach to have a good working Drupal 8 and Foundation 6 theme to start building my theme on?
The .gitignore file that is downloaded with Foundation 6 is tied to just the Foundation framework - if you're planning to track the whole Drupal site, you can safely delete it and just use the one that comes at the Drupal root.  

In the past I've just tracked everything (and committed everything) in the framework up, including the bower_components folder. 

My [theme_name].libraries.yml file looks like this: 

global-styling:
  version: 1.x
  css:
    theme:
      stylesheets/fonts/stylesheet.css: {}
      stylesheets/foundation-icons/foundation-icons.css: {}
      stylesheets/app.css: {}
      stylesheets/print.css: { media: print }
  js: 
    bower_components/fastclick/lib/fastclick.js: {}
    bower_components/foundation/js/foundation.min.js: {}
    bower_components/foundation/js/foundation/foundation.topbar.js: {}
    js/app.js: {}
  dependencies:
    - core/jquery
    - core/jquery.once

homepage:
  version: 1.x
  js:
    js/jquery-ui-1.11.4.custom/jquery-ui.min.js: {}
    js/wcreek-slider.js: {}


The js is my own theme's js folder, and you can see I'm including some bower_components files.  I'm using the default jquery that shipped with Drupal 8, but I'm using Foundation 5.  You might want to rather include the version of jquery from the bower_components. 

Also I would recommend that you set your Drupal administration theme to be different from your Foundation theme (I usually set it to Seven) so there's no conflict between Foundation and the Drupal admin tools, like views, etc. 

You might be able to use jquery_update module to specify a lower version of jquery for the admin theme (I haven't tried this in Drupal 8 yet). This might be needed if you are using the overlay module.