Git Linear Hook

Automatically add Linear ticket IDs to commit messages

SuperHappyDevHouse 66 Lightning Talk • Built with Claude

Today at SuperHappyDevHouse 66

From trying someone else's tool → building my own

The Solution

A Git hook that automatically extracts Linear ticket info from branch names

Branch:

feature/abc-601-user-authentication-system

Your commit:

git commit -m "add password validation"

Result:

[ABC-601] User authentication system

add password validation

How It Works

#!/bin/zsh
# Optimized for zsh with smart text processing
# Works with all commit types: -m, -a, interactive

Key Features

One hook, all use cases covered ✓

Quick Install

# Download the hook
curl -o .git/hooks/prepare-commit-msg \
https://raw.githubusercontent.com/jaredsohn/git-linear-hook/main/prepare-commit-msg

# Make it executable
chmod +x .git/hooks/prepare-commit-msg

# That's it! Start committing.

Global install: Set up once, works in all repos
Per-repo install: Just this repository

Live Demo

Let's see it in action!

Interactive demonstration of the hook working with:
• Different branch naming patterns
• Various commit methods
• Real-world scenarios

Thank You!

Questions?

GitHub: github.com/jaredsohn/git-linear-hook
Open Source: MIT License

1 / 10