k9i-ha
Last Updated: February 25, 2016
·
394
· raphaelstolt

Alias for changing into the hooks directory of a git repo

When developing or fine-tuning git hooks the following alias might come in handy. Simply add it to your ~/.profile and reload your profile via source ~/.profile.

alias gh='cd $(git rev-parse --git-dir)/hooks'

Now when working in a git repository gh will take you instantly to it's relevant hooks directory.