Use of Git hooks for pushing clean code

Prerequisite for attendees :

Knowledge of Git

Session Details/Overview :

Git hooks are scripts that Git executes before or after events such as commit, push, and receive. Git hooks are a built-in feature - no need to download anything. Git hooks runs locally.

Session Details:

  • pre-commit: Check the commit message for spelling errors.
  • pre-receive: Enforce project coding standards.
  • post-commit: Email/SMS team members of a new commit.
  • post-receive: Push the code to production.

Key takeaways:

  • Improve coding standards at developers ends only.