Modified get_branches to skip over merged branches