Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Git template that contains a few helpful hooks written in Ruby
Ruby Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
hooks
info
script
LICENSE
README.md
description

README.md

git_template

A Git template that contains a few helpful hooks written in Ruby.

Installation

  1. Clone the repository:

    cd ~/mycode # anywhere is fine
    git clone git@github.com:toddmazierski/git_template.git 
  2. Symlink to your home folder:

    ln -s ~/mycode/git_template ~/.git_template
  3. Configure Git to use the template globally:

    git config --global init.templatedir "~/.git_template"
  4. For new repositories, the hooks will be automatically installed:

    git init
  5. For existing repositories, reinitialize the repository:

    rm -rf .git/hooks
    git init

Experimental

To update the hooks for multiple, existing repositories:

ruby script/update_hooks.rb ~/mycode

TODO

  • Language conditionals
Something went wrong with that request. Please try again.