$ mkdir -p ~/.git/hooks
$ vi ~/.git/hooks/post-checkout
#!/bin/sh
echo "Project : $0"
echo "Working on `pwd` ..."
git config remote.origin.push refs/heads/*:refs/for/*
echo "Get Hooks ..."
HOOK_DIR='.git/hooks'
echo " - commit-msg"
wget -P $HOOK_DIR -q http://yanxen.no-ip.org:8081/tools/hooks/commit-msg
chmod u+x -R $HOOK_DIR
$ chmod u+x -R ~/.git/hooks
$ git clone --template=/home/user/.git ssh://user@gerrit.server:29418/my_project
沒有留言:
張貼留言