// Set global gitignore file
git config --global core.excludesfile <filename>

Key points