Using Drupal console, can I gitignore console folder? I'm working on a Drupal 8 project, and installed Drupal console globally on my system.

The command drupal init created a console folder at the root of Drupal.

It seems to be used as a cache directory. Well it's a guess from what I see inside it.

Can I safely add this directory to my .gitignore file? Or should I commit it?
Yes, you can add the console directory to your .gitignore like so:

/console


However, similar to drush, you may want to carry around project-specific configurations in your repository. This allows changing the behavior of Drupal Console on a per-repository basis.

If you do want to have per-repository Drupal Console configurations then do not gitignore the console directory and instead commit it to the project.

See https://hechoendrupal.gitbooks.io/drupal-console/en/commands/init.html for details on how to initialize configurations.