Implement branch retrieval from JGit