add getBranch and mergeFromFile functions
add test for getBranch