public Ref checkoutBranch ( Git git , String branch ) { try { return git . checkout ( ) . setName ( branch ) . call ( ) ; } catch ( GitAPIException e ) { throw new IllegalStateException ( e ) ; } }
Checkout existing branch .