get tree and latest commit hash code.