Implement support for listing and merging branches.