MatthewDolan / template-go

A template for Go repositories
MIT License
1 stars 0 forks source link

Investigate local git hooks #3

Open MatthewDolan opened 2 years ago

MatthewDolan commented 2 years ago

Investigate whether it’s possible to check in a git-hooks folder that can be loaded automatically when performing git operations on this repo.

Initially looking around, it doesn’t seem easy. It appears that git hooks are global or set on the repo locally but not checked in. This would need something that’s local to this repo and checked in.

MatthewDolan commented 2 years ago

I couldn't find any easy way to implement this. This isn't built into git itselt. There are some hacks with running a command which symlinks the hooks, but it wasn't trivial to add this.