Changed getBranch to retrieve the sha of a branche's head