change branches before pulling new data. abort on checkout failure.