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.
Written by Raphael Stolt
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#