Prep branch detect