Git hooks, practical uses (yes, even on Windows)

time
a year ago
view
0 views

original uri https://www.youtube.com/watch?v=fMYv6-SZsSo

Git hooks: What are they? What do they do for you? Dive right in with this relaxing overview and practical demonstration of the power of Git hooks! (For an outline click "SHOW MORE")

What are Git hooks?

Git hooks allow you to run your own scripts whenever important events occur in the Git life-cycle, like committing, merging, and pushing. That means the only limit to Git hooks is your imagination (and the patience of your coworkers).

Index of contents

  • 00:07: Overview of Git hooks
  • 00:46: The "nitty gritty" of git hooks
  • 01:18: Default sample hooks
  • 01:41: Location of Git's repo template
  • 02:08: Pre vs Post hooks
  • 02:52: zero == hero
  • 03:36: Local vs server side hooks
  • 03:49: Enabling a hook
  • 04:22: Gotchas (pitfalls)
    • 04:24: Surprises!
    • 04:45: Hooks not source controlled
    • 05:42: bypass a hook with --no-verify
    • 05:59: silent failure mode
  • 06:20: Getting practical with git hooks
  • 06:27: Verify name/email with pre-commit hook
  • 07:57: Ensure no words match a "blacklist"
  • 08:16: Live demo of name/email pre-commit hook
  • 09:43: pre-commit vs pre-push hooks
  • 10:32: Your choice of scripting language (#! shebang!)
  • 11:11: Get hooks working on Windows
  • 12:16: Set hooks dir with core.hookspath

Learn more and join the git hooks conversation at https://tygertec.com/git-hooks-practical-uses-windows/

  • Twitter: https://twitter.com/tygertec
  • Site: https://tygertec.com

Thanks for watching. Subscribe now and enjoy relaxing tech tutorials.

Loading comments...
affpapa
sigma-africa
sigma-asia
sigma-europe

Licensed