Use a postreceive hook rather than a prereceive.