arturopala/make-it-g8

Read global git ignore file to create a local .gitignore

Closed this issue · 2 comments

make-it-g8 currently checks whether there is a .gitignore file in the source directory. That's great but some people use a global gitignore file for things like ignoring target, .bloop, .metals and so on. Currently, make-it-g8 seems to completely ignore this. I think it would be a good idea to also read that ignore file if present. The location of the global gitignore file can be configured: git config --global core.excludesFile.
As a workaround, one can cp $(git config --global core.excludesFile) path/to/repo/.gitignore before running make-it-g8. Maybe that would, indeed, be a good idea for make-it-g8. It is already checking whether a .gitignore is present. It might as well offer to create one using the contents of $(git config --global core.excludesFile) if present. What do you think?

@phdoerfler, sorry for the very late reply; I might have missed the notification in the email flood. Yes, that's definitely a good idea.

support for global .gitgnore has been released in version 1.28.0