Is there a way to tell git to automatically create/populate .gitignore and certain files in the .git/hooks folder every time git init is run on a certain machin
If we are talking about a repo containing JavaScript and using npm, then you can use husky to set up commit hooks.
npm install husky --save-dev
// package.json
{
"husky": {
"hooks": {
"pre-commit": "npm test",
"pre-push": "npm test",
"...": "..."
}
}
}
This does not answer the original question directly, but may be relevant to many developers.