Fix pushToRepo so it works as expected