Added getCommit and getBranch

getCommit gets the commit object, getBranch gets the commit object of
the given names head