Be smarter about branch creation