Skip to content

Instantly share code, notes, and snippets.

@juliamae
Last active August 29, 2015 14:05
Show Gist options
  • Save juliamae/e7e8706a3c30b1718309 to your computer and use it in GitHub Desktop.
Save juliamae/e7e8706a3c30b1718309 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# This hook can be found in https://github.com/juliamae/githooks
commit_msg_file = ARGV[0]
branch_name = `git branch | grep '*'`.gsub(/[* |\n]/,"")
if message = open(commit_msg_file).read
open(commit_msg_file, 'w') do |f|
f.puts message.gsub("Merge", ":part_alternation_mark:erge")
.gsub(" remote-tracking branch", "")
.gsub(branch_name, "this fine-ass branch right here")
end
end
@wizardishungry
Copy link

that'll look great on the console :(

@juliamae
Copy link
Author

¯_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment