New: common code for finding branches of a given type
New: overhaul of the checkout and list commands