Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
pre-receive git hook in python script to print incoming refs
#!/usr/bin/env python
import sys
import fileinput
# Read in each ref that the user is trying to update
for line in fileinput.input():
print "pre-receive: Trying to push ref: %s" % line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment