I've got a post receive hook setup on the remote repo that tries to determine the branch name of the incoming push as follows:
$branch = `git rev-parse --abbrev-ref HEAD`
What i'm finding, though, is that no matter what branch I push from my $branch variable gets set with 'master'.
Any ideas?
post-receive
is receiving agit push --tags
for example (and probablygit push origin my_tagname
) then theref
you'll be getting isrefs/tags/my_tagname
and notrefs/branch/my_branchname
– Thelma