Git hooks make for a great help in OSS maintenance and are a very practical and useful tool that a lot of organisations in the software industry can benefit from adopting but I feel there's a lack a conversation or a lack of exposure around them.
This workshop will cover how git handles hooks internally (alongwith an overview of git internals), how to write your own hooks, the pre-commit framework, a bingo of common problems you might face setting up your own hooks or sharing them and demonstrations of how I've adopted pre-commit hooks in professional settings as well as fun experiments I've done on my own personal workflows (meta-hooks, fun TUI updates).
Introduction to git hooks
What git hooks are and why they matter
Local vs. server-side hooks (brief overview, focus on local)
Real-world examples of hooks in action
Going over Git internals relevant to hooks: how Git executes them, what chaining/limitations exist.
Exploring built-in hooks
Tour of the .git/hooks
directory
Demo: activating a sample hook
Hands-on with Pre-Commit hooks
Writing a simple custom hook
Adding checks for commit messages, file changes, or secrets
Sharing hooks across a team
Other useful hooks
Exploring the uses for commit-msg
, pre-push
and post-merge
Leveraging the ecosystem
Introduction to pre-commit
framework (multi-language support, shareable configs)
Using Husky for JavaScript/Node projects
Comparing custom hooks vs. ecosystem tools
Building complex hooks
Either pick from a prepared list of fun/useful hook ideas or add support for a project you already use
Putting It All Together
Designing a hook strategy for your workflow/team
Where hooks fit in modern CI practices
Resources to go further
What Git hooks are and how they fit into development workflows
Hands-on experience writing and customizing Git hooks
How you can integrate hooks into team projects with frameworks like pre-commit
or Husky
Explore creative and practical applications to make workflows smoother
By covering projects that enable you to go beyond default IDE code-formatting and linting in general functionalities as well as in specific field examples, the workshop aims to get folks aware about adopting existing pre-commit hooks as well as to start thinking creatively in this space about how they can make hooks to work within their own specific contexts and software practices.
This doesn't seem to be enough content to fill a full workshop time
Good for a talk. I'm not sure if we're reviewing workshop proposals too.
Can do this as a short lightning talk instead.
This is an interesting workshop proposal. Hooks have umpteen applications. It would have helped if the proposal had given examples of what would be covered during the workshop, as a reference for potential attendees. Not having this leaves things to imagination, and is a shortcoming in the proposal, but this can be remedied by getting the proposer for an update.
The longer timeline is useful as attendees can actually try out stuff during the workshop. Trying out things in bash, python and node, plus debugging with multiple cases should utilize the time effectively.