Extract repo branch checkout into separate method