Here is my hook:

#!/bin/bash

while read oldrev newrev refname;
do
  branch=${refname#refs/heads/}
  remote=""

  if [ "$branch" == "master" ];
  then
    remote="www"
  elif [ "$branch" == "devel" ];
  then
    remote="dev"
  else
    echo "Unknown branch \"$branch\"; exiting..."
    exit 0
  fi

  echo "Pushing $branch to $remote..."
  cd /var/git_repos/site.git
  #strace git push -v $remote $branch 2&> /var/log/strace-git.log
  git push -v $remote $branch
done

exit 0

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to