Skip to content

Instantly share code, notes, and snippets.

View amessinger's full-sized avatar
🐠

Antonin Messinger amessinger

🐠
  • Ponton 17
  • Paris, France
View GitHub Profile
@amessinger
amessinger / prepare-commit-msg.sh
Last active September 7, 2018 16:28 — forked from bartoszmajsak/prepare-commit-msg.sh
Automatically generate git commit message from the branch name (angular convention)
#!/bin/bash
# Assesses your branch naming follow Angular's commit message format (https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits)
# Global Setup
# - create a `~/.git/hooks` folder
# - create the `prepare-commit-msg` hook file in this folder and paste this script
# - make git use this folder `git config --global core.hooksPath ~/.git/hooks`
# - allow for emtpy commit message `git config --global alias.commit "commit --allow-empty"`