Member-only story
Git Hooks — The Missing Tutorial
Automate stuff? That’s what programming should be about
5 min readFeb 18, 2020
Using Git Hooks is just like having automated robots who do whatever you want, when a command is run in Git.
Now, since you should be running Git anyway (unless you are running some other version control software) so it is like you’ve got slaves working for you for free! How great is that!
Difficulty: Beginner | Easy | Normal | Challenging
Prerequisites:
- The tutorial is designed for the Mac, and refers to commands using Mac OS
- Be able to use VIM to make changes to a file (Guide HERE)
- Have some familiarity with Git (Common commands are HERE)
- Have a reason to automate something along with your Git commands (although some suggestions are listed below)
Terminology
Git: Git is a distributed version-control system for tracking changes in source code during software development
Git Hooks: Programs you can use to tigger actions at points in Git’s execution
Script: A program which is carried out by another program