changed 'branch' reference to 'ref'

use ref to identify which branch has been pushed to, so that the script doesn't attempt to pull one repo when the branch that has been checked out doens't match the one that has been pushed