Skip to content

Instantly share code, notes, and snippets.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Solution</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>
@curiouslychase
curiouslychase / commit-msg
Created August 13, 2013 20:35 — forked from anonymous/commit-msg
Place this in the following path relative to your git repo's root: .git/hooks/commit-msg
#!/usr/bin/env ruby
# Hook into the message and append the branch name so that we don't have to
# manually do it ourselves!
# This is the message that you put when you do:
# `git commit -m "This is my message"
message_file = ARGV[0]
message = File.read(message_file).strip
branch_name = `git rev-parse --abbrev-ref HEAD`.strip